{
  "openapi": "3.1.1",
  "info": {
    "title": "Ren API",
    "description": "Agent infrastructure platform",
    "version": "0.1.24"
  },
  "tags": [
    {
      "name": "Activation"
    },
    {
      "name": "Agents"
    },
    {
      "name": "Billing"
    },
    {
      "name": "Blueprints"
    },
    {
      "name": "Dashboard"
    },
    {
      "name": "Emails"
    },
    {
      "name": "Environments"
    },
    {
      "name": "File Stores"
    },
    {
      "name": "Github"
    },
    {
      "name": "Google"
    },
    {
      "name": "Inference"
    },
    {
      "name": "Invitations"
    },
    {
      "name": "Linear"
    },
    {
      "name": "Mcps"
    },
    {
      "name": "Me"
    },
    {
      "name": "Memory Stores"
    },
    {
      "name": "Models"
    },
    {
      "name": "Oauth Apps"
    },
    {
      "name": "Onboarding"
    },
    {
      "name": "Org"
    },
    {
      "name": "Organization Logos"
    },
    {
      "name": "Pats"
    },
    {
      "name": "Pods"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Publishers"
    },
    {
      "name": "Registry"
    },
    {
      "name": "Replays"
    },
    {
      "name": "Resource Icons"
    },
    {
      "name": "Sessions"
    },
    {
      "name": "Skills"
    },
    {
      "name": "Slack"
    },
    {
      "name": "Tasks"
    },
    {
      "name": "Telegram"
    },
    {
      "name": "Topology"
    },
    {
      "name": "Topology Shares"
    },
    {
      "name": "Vaults"
    },
    {
      "name": "Webhook Triggers"
    }
  ],
  "paths": {
    "/api/activation": {
      "get": {
        "operationId": "activation.get",
        "summary": "Get the organization's onboarding checklist state",
        "tags": [
          "Activation"
        ],
        "responses": {
          "200": {
            "description": "Completed checklist steps and whether the checklist is finished or dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Activation"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/activation/dismiss": {
      "post": {
        "operationId": "activation.dismiss",
        "summary": "Dismiss the organization's onboarding checklist",
        "tags": [
          "Activation"
        ],
        "responses": {
          "200": {
            "description": "Checklist state after dismissal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Activation"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/agents": {
      "post": {
        "operationId": "agent.create",
        "summary": "Create an agent",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Created agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "icon": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tags": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  },
                  "version": {
                    "default": "patch",
                    "description": "Explicit semver (e.g. 1.2.0) or a bump keyword (major|minor|patch, default patch).",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "major",
                          "minor",
                          "patch"
                        ]
                      }
                    ]
                  },
                  "description": {
                    "description": "Description for the agent's first version.",
                    "type": "string"
                  },
                  "prompt": {
                    "description": "System prompt for the agent's first version.",
                    "type": "string"
                  },
                  "model": {
                    "description": "Model for the agent's first version; omit to use the default model.",
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ModelSelection"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "permission": {
                    "$ref": "#/components/schemas/PermissionConfig"
                  },
                  "skills": {
                    "description": "Skills bound to the agent's first version. Deduped by skillId.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "skillId": {
                          "type": "string"
                        },
                        "skillVersionId": {
                          "default": null,
                          "description": "Pin a specific skill version, or null to track the skill's latest version.",
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "skillId"
                      ]
                    }
                  },
                  "mcps": {
                    "description": "MCPs bound to the agent's first version. Deduped by mcpId.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "mcpId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "mcpId"
                      ]
                    }
                  },
                  "releaseNotes": {
                    "type": "string",
                    "maxLength": 4096
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "agent.list",
        "summary": "List and search agents",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "List of agents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Agent"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "pod",
                "org"
              ]
            },
            "description": "Restrict to a single visibility tier within the caller's scope."
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive match across name and slug."
          },
          {
            "in": "query",
            "name": "published",
            "schema": {
              "type": "boolean"
            },
            "description": "true = only published (registry) agents; false = only unpublished."
          },
          {
            "in": "query",
            "name": "publisherId",
            "schema": {
              "type": "string"
            },
            "description": "Restrict to agents carried by a specific publisher."
          },
          {
            "in": "query",
            "name": "tagged",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "description": "Only agents carrying every one of these tags. Repeat the param for multiple tags."
          }
        ]
      }
    },
    "/api/agents/{idOrSlug}": {
      "get": {
        "operationId": "agent.get",
        "summary": "Get an agent by ID or slug",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Agent details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "idOrSlug",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
                },
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[a-z0-9-]+$",
                  "description": "URL-friendly identifier"
                }
              ]
            },
            "required": true
          }
        ]
      }
    },
    "/api/agents/{id}": {
      "patch": {
        "operationId": "agent.update",
        "summary": "Update agent metadata",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Updated agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "websiteMetadata": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/WebsiteMetadata"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tags": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/{id}/archive": {
      "post": {
        "operationId": "agent.archive",
        "summary": "Archive an agent",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Archived agent, with the blast radius (projectCount/podCount) of placements that referenced it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentArchiveResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/agents/{id}/publish": {
      "post": {
        "operationId": "agent.publish",
        "summary": "Publish an agent",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Published agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/agents/{id}/promote": {
      "post": {
        "operationId": "agent.promote",
        "summary": "Promote a private agent to org scope in place, cascading to its private dependencies",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Promoted agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/agents/{id}/deprecate": {
      "post": {
        "operationId": "agent.deprecate",
        "summary": "Deprecate an agent",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Deprecated agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/{id}/undeprecate": {
      "post": {
        "operationId": "agent.undeprecate",
        "summary": "Undeprecate an agent",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Undeprecated agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/agents/{id}/versions": {
      "post": {
        "operationId": "agent.version.create",
        "summary": "Create an agent version",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Created agent version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersion"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "default": "patch",
                    "description": "Explicit semver (e.g. 1.2.0) or a bump keyword (major|minor|patch, default patch).",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "major",
                          "minor",
                          "patch"
                        ]
                      }
                    ]
                  },
                  "description": {
                    "description": "Omit to inherit the latest version's description; empty string clears it.",
                    "type": "string"
                  },
                  "prompt": {
                    "description": "Omit to inherit the latest version's prompt; empty string clears it.",
                    "type": "string"
                  },
                  "model": {
                    "description": "Omit to inherit the latest version's model; null clears it to the default model.",
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ModelSelection"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "permission": {
                    "$ref": "#/components/schemas/PermissionConfig"
                  },
                  "skills": {
                    "description": "Omit to inherit the latest version's skills; an empty array clears them. Deduped by skillId.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "skillId": {
                          "type": "string"
                        },
                        "skillVersionId": {
                          "default": null,
                          "description": "Pin a specific skill version, or null to track the skill's latest version.",
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "skillId"
                      ]
                    }
                  },
                  "mcps": {
                    "description": "Omit to inherit the latest version's mcps; an empty array clears them. Deduped by mcpId.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "mcpId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "mcpId"
                      ]
                    }
                  },
                  "releaseNotes": {
                    "type": "string",
                    "maxLength": 4096
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "agent.version.list",
        "summary": "List agent versions",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "List of agent versions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentVersion"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/agents/{id}/versions/{version}": {
      "get": {
        "operationId": "agent.version.get",
        "summary": "Get an agent version",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Agent version details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersion"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "version",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "required": true
          }
        ]
      }
    },
    "/api/agents/{id}/versions/{version}/archive": {
      "post": {
        "operationId": "agent.version.archive",
        "summary": "Archive an agent version",
        "description": "Archiving the latest version repoints agents tracking latest to the next non-archived version. The response reports the blast radius (projectCount/podCount) of the pinned and tracking-latest placements affected.",
        "tags": [
          "Agents"
        ],
        "responses": {
          "200": {
            "description": "Archived agent version, with the blast radius of the placements it affected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionArchiveResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "version",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "required": true
          }
        ]
      }
    },
    "/api/blueprints": {
      "post": {
        "operationId": "blueprint.create",
        "summary": "Create a blueprint",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "Created blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "description": "Explicit slug; derived from the name when omitted.",
                    "type": "string"
                  },
                  "kind": {
                    "$ref": "#/components/schemas/BlueprintKind"
                  },
                  "categories": {
                    "$ref": "#/components/schemas/BlueprintCategories"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "default": "",
                    "type": "string"
                  },
                  "brandColor": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$",
                        "description": "The vendor's own colour, for painting a ground behind a logo that only reads on one theme."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "icon": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "examplePrompts": {
                    "default": [],
                    "maxItems": 6,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "description": "Starter prompts the composer offers. Suggestions — unlike `initialPrompt`, nothing sends them."
                  },
                  "websiteMetadata": {
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/WebsiteMetadata"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "replays": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "spec": {
                    "$ref": "#/components/schemas/Spec"
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "spec"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "blueprint.list",
        "summary": "List blueprints",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "List of blueprints",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Blueprint"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "pod",
                "org"
              ]
            }
          }
        ]
      }
    },
    "/api/blueprints/push": {
      "post": {
        "operationId": "blueprint.push",
        "summary": "Create or update a blueprint from a raw Spec",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "Upserted blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Existing blueprint to update in place; omit to create a new one.",
                    "type": "string"
                  },
                  "slug": {
                    "description": "Stable upsert key, so a git-driven publish is idempotent. Takes precedence over `id`.",
                    "type": "string"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "type": "string"
                  },
                  "kind": {
                    "$ref": "#/components/schemas/BlueprintKind"
                  },
                  "categories": {
                    "$ref": "#/components/schemas/BlueprintCategories"
                  },
                  "examplePrompts": {
                    "maxItems": 6,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "description": "Starter prompts the composer offers. Suggestions — unlike `initialPrompt`, nothing sends them."
                  },
                  "brandColor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$",
                        "description": "The vendor's own colour, for painting a ground behind a logo that only reads on one theme."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "websiteMetadata": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/WebsiteMetadata"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "spec": {
                    "$ref": "#/components/schemas/Spec"
                  }
                },
                "required": [
                  "kind",
                  "spec"
                ]
              }
            }
          }
        }
      }
    },
    "/api/blueprints/add": {
      "post": {
        "operationId": "blueprint.add",
        "summary": "Add a blueprint to the caller's workspace",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "Add report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlueprintAddReport"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlueprintAddInput"
              }
            }
          }
        }
      }
    },
    "/api/blueprints/{id}": {
      "get": {
        "operationId": "blueprint.get",
        "summary": "Get a blueprint",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "Blueprint details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^blp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "blueprint.update",
        "summary": "Update a blueprint",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "Updated blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^blp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "$ref": "#/components/schemas/BlueprintKind"
                  },
                  "categories": {
                    "$ref": "#/components/schemas/BlueprintCategories"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "type": "string"
                  },
                  "brandColor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$",
                        "description": "The vendor's own colour, for painting a ground behind a logo that only reads on one theme."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "examplePrompts": {
                    "maxItems": 6,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "description": "Starter prompts the composer offers. Suggestions — unlike `initialPrompt`, nothing sends them."
                  },
                  "websiteMetadata": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/WebsiteMetadata"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "replays": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "spec": {
                    "$ref": "#/components/schemas/Spec"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/blueprints/{id}/publish": {
      "post": {
        "operationId": "blueprint.publish",
        "summary": "Publish a blueprint",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "Published blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^blp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/blueprints/{id}/deprecate": {
      "post": {
        "operationId": "blueprint.deprecate",
        "summary": "Deprecate a blueprint",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "Deprecated blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^blp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/blueprints/{id}/undeprecate": {
      "post": {
        "operationId": "blueprint.undeprecate",
        "summary": "Undeprecate a blueprint",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "Undeprecated blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^blp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/blueprints/{id}/archive": {
      "post": {
        "operationId": "blueprint.archive",
        "summary": "Archive a blueprint",
        "tags": [
          "Blueprints"
        ],
        "responses": {
          "200": {
            "description": "Archived blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Blueprint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^blp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/billing": {
      "get": {
        "operationId": "billing.get",
        "summary": "Get organization billing summary",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Billing summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "creditsBalance": {
                      "type": "string"
                    },
                    "balanceCents": {
                      "type": "number"
                    },
                    "consumedCredits": {
                      "type": "string"
                    },
                    "consumedAmountCents": {
                      "type": "number"
                    },
                    "grantedCredits": {
                      "type": "string"
                    },
                    "plan": {
                      "type": "string",
                      "enum": [
                        "free",
                        "plan_50",
                        "plan_75",
                        "plan_100",
                        "plan_150",
                        "plan_200",
                        "plan_300",
                        "plan_400",
                        "plan_500",
                        "plan_750",
                        "plan_1000",
                        "plan_1500",
                        "plan_2000",
                        "plan_3000",
                        "plan_4000",
                        "plan_5000",
                        "plan_7500",
                        "plan_10000"
                      ]
                    },
                    "planStatus": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "renewsAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pendingPlan": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "plan_50",
                            "plan_75",
                            "plan_100",
                            "plan_150",
                            "plan_200",
                            "plan_300",
                            "plan_400",
                            "plan_500",
                            "plan_750",
                            "plan_1000",
                            "plan_1500",
                            "plan_2000",
                            "plan_3000",
                            "plan_4000",
                            "plan_5000",
                            "plan_7500",
                            "plan_10000"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "creditsBalance",
                    "balanceCents",
                    "consumedCredits",
                    "consumedAmountCents",
                    "grantedCredits",
                    "plan",
                    "planStatus",
                    "renewsAt",
                    "pendingPlan"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/billing/usage": {
      "get": {
        "operationId": "billing.usage",
        "summary": "Get organization-wide credit usage",
        "description": "Ren-billed credits consumed across the organization over a bounded time range, broken down by a chosen dimension (user, member, agent, model, session, project, pod, or source) with a per-day trend. Inference served by the organization's own connected subscription costs Ren nothing and is excluded. Requires an explicit `start`/`end` range (max 92 days). Served from the local hourly usage rollup; values may lag live spend by up to roughly one hour plus a meter cycle.",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Organization credit usage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "groupBy",
            "schema": {
              "default": "source",
              "type": "string",
              "enum": [
                "user",
                "member",
                "agent",
                "model",
                "session",
                "project",
                "pod",
                "source",
                "servedBy"
              ]
            }
          },
          {
            "in": "query",
            "name": "start",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "end",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/billing/invoices": {
      "get": {
        "operationId": "billing.invoices",
        "summary": "List invoices for the organization",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Paginated invoice list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invoices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "number": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "paymentStatus": {
                            "type": "string"
                          },
                          "totalAmountCents": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "issuingDate": {
                            "type": "string"
                          },
                          "invoiceType": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "number",
                          "status",
                          "paymentStatus",
                          "totalAmountCents",
                          "currency",
                          "issuingDate",
                          "invoiceType"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        },
                        "totalCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "currentPage",
                        "totalPages",
                        "totalCount"
                      ]
                    }
                  },
                  "required": [
                    "invoices",
                    "meta"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "perPage",
            "schema": {
              "default": 10,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ]
      }
    },
    "/api/billing/invoice-payment-url": {
      "get": {
        "operationId": "billing.invoicePaymentUrl",
        "summary": "Get a payment URL for an invoice",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Payment URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/billing/plans": {
      "get": {
        "operationId": "billing.plans",
        "summary": "List available subscription plans",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Subscription plans",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "enum": [
                          "plan_50",
                          "plan_75",
                          "plan_100",
                          "plan_150",
                          "plan_200",
                          "plan_300",
                          "plan_400",
                          "plan_500",
                          "plan_750",
                          "plan_1000",
                          "plan_1500",
                          "plan_2000",
                          "plan_3000",
                          "plan_4000",
                          "plan_5000",
                          "plan_7500",
                          "plan_10000"
                        ]
                      },
                      "priceCents": {
                        "type": "number"
                      },
                      "creditsPerCycle": {
                        "type": "number"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tagline": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "badge": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sortOrder": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "key",
                      "priceCents",
                      "creditsPerCycle",
                      "name",
                      "description",
                      "tagline",
                      "badge",
                      "sortOrder"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/billing/subscribe": {
      "post": {
        "operationId": "billing.subscribe",
        "summary": "Start a subscription-plan checkout",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Checkout URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "checkoutUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "checkoutUrl"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan": {
                    "type": "string",
                    "enum": [
                      "plan_50",
                      "plan_75",
                      "plan_100",
                      "plan_150",
                      "plan_200",
                      "plan_300",
                      "plan_400",
                      "plan_500",
                      "plan_750",
                      "plan_1000",
                      "plan_1500",
                      "plan_2000",
                      "plan_3000",
                      "plan_4000",
                      "plan_5000",
                      "plan_7500",
                      "plan_10000"
                    ]
                  }
                },
                "required": [
                  "plan"
                ]
              }
            }
          }
        }
      }
    },
    "/api/billing/portal": {
      "get": {
        "operationId": "billing.portal",
        "summary": "Get a customer-portal URL to manage the plan",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Portal URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/billing/change-plan": {
      "post": {
        "operationId": "billing.changePlan",
        "summary": "Upgrade or downgrade the current subscription plan",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Plan change started; checkoutUrl is set when the customer must authenticate the charge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "checkoutUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "checkoutUrl"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan": {
                    "type": "string",
                    "enum": [
                      "plan_50",
                      "plan_75",
                      "plan_100",
                      "plan_150",
                      "plan_200",
                      "plan_300",
                      "plan_400",
                      "plan_500",
                      "plan_750",
                      "plan_1000",
                      "plan_1500",
                      "plan_2000",
                      "plan_3000",
                      "plan_4000",
                      "plan_5000",
                      "plan_7500",
                      "plan_10000"
                    ]
                  }
                },
                "required": [
                  "plan"
                ]
              }
            }
          }
        }
      }
    },
    "/api/billing/cancel": {
      "post": {
        "operationId": "billing.cancel",
        "summary": "Cancel the subscription at the next renewal",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Cancellation scheduled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/dashboard": {
      "get": {
        "operationId": "dashboard.get",
        "summary": "Get dashboard analytics",
        "tags": [
          "Dashboard"
        ],
        "responses": {
          "200": {
            "description": "Dashboard analytics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "period",
            "schema": {
              "default": "30d",
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "90d"
              ]
            }
          },
          {
            "in": "query",
            "name": "podId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agentId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "summary",
                  "over_time",
                  "over_time_by_user",
                  "by_agent",
                  "by_user",
                  "filters"
                ]
              }
            }
          }
        ]
      }
    },
    "/api/environments": {
      "post": {
        "operationId": "environment.create",
        "summary": "Create an environment",
        "tags": [
          "Environments"
        ],
        "responses": {
          "200": {
            "description": "Created environment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "networking": {
                    "$ref": "#/components/schemas/NetworkingConfig"
                  },
                  "description": {
                    "default": "",
                    "type": "string"
                  },
                  "hostingType": {
                    "default": "cloud",
                    "type": "string",
                    "enum": [
                      "cloud"
                    ]
                  },
                  "packages": {
                    "$ref": "#/components/schemas/PackagesConfig"
                  },
                  "cpuCount": {
                    "$ref": "#/components/schemas/TemplateCpuCount"
                  },
                  "memoryMB": {
                    "$ref": "#/components/schemas/TemplateMemoryMB"
                  },
                  "buildCommands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 4096
                    }
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  }
                },
                "required": [
                  "name",
                  "networking"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "environment.list",
        "summary": "List environments",
        "tags": [
          "Environments"
        ],
        "responses": {
          "200": {
            "description": "List of environments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Environment"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "orgId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "pod",
                "org"
              ]
            }
          }
        ]
      }
    },
    "/api/environments/{id}": {
      "get": {
        "operationId": "environment.get",
        "summary": "Get an environment",
        "tags": [
          "Environments"
        ],
        "responses": {
          "200": {
            "description": "Environment details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^env_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "environment.update",
        "summary": "Update an environment",
        "tags": [
          "Environments"
        ],
        "responses": {
          "200": {
            "description": "Updated environment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^env_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "type": "string"
                  },
                  "networking": {
                    "$ref": "#/components/schemas/NetworkingConfig"
                  },
                  "packages": {
                    "$ref": "#/components/schemas/PackagesConfig"
                  },
                  "cpuCount": {
                    "$ref": "#/components/schemas/TemplateCpuCount"
                  },
                  "memoryMB": {
                    "$ref": "#/components/schemas/TemplateMemoryMB"
                  },
                  "buildCommands": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 4096
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "environment.delete",
        "summary": "Delete an environment permanently",
        "tags": [
          "Environments"
        ],
        "responses": {
          "200": {
            "description": "Deleted environment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^env_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/environments/{id}/build": {
      "post": {
        "operationId": "environment.build.start",
        "summary": "Start a custom template build for an environment",
        "tags": [
          "Environments"
        ],
        "responses": {
          "200": {
            "description": "Queued build",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentBuild"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^env_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/environments/{id}/builds": {
      "get": {
        "operationId": "environment.build.list",
        "summary": "List an environment's builds",
        "tags": [
          "Environments"
        ],
        "responses": {
          "200": {
            "description": "Builds, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnvironmentBuild"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^env_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/environments/{id}/archive": {
      "post": {
        "operationId": "environment.archive",
        "summary": "Archive an environment",
        "tags": [
          "Environments"
        ],
        "responses": {
          "200": {
            "description": "Archived environment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^env_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/file-stores": {
      "post": {
        "operationId": "fileStore.create",
        "summary": "Create a file store",
        "tags": [
          "File Stores"
        ],
        "responses": {
          "200": {
            "description": "Created file store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileStore"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "default": "",
                    "type": "string"
                  },
                  "isDefault": {
                    "default": false,
                    "type": "boolean"
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "fileStore.list",
        "summary": "List file stores",
        "tags": [
          "File Stores"
        ],
        "responses": {
          "200": {
            "description": "List of file stores",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FileStore"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "org"
              ]
            }
          }
        ]
      }
    },
    "/api/file-stores/{id}": {
      "get": {
        "operationId": "fileStore.get",
        "summary": "Get a file store",
        "tags": [
          "File Stores"
        ],
        "responses": {
          "200": {
            "description": "file store details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileStore"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "fileStore.update",
        "summary": "Update a file store",
        "tags": [
          "File Stores"
        ],
        "responses": {
          "200": {
            "description": "Updated file store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileStore"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/file-stores/{id}/archive": {
      "post": {
        "operationId": "fileStore.archive",
        "summary": "Archive a file store",
        "tags": [
          "File Stores"
        ],
        "description": "Archives the store metadata but keeps every stored object. Bytes remain recoverable until a retention sweep purges stores archived more than 30 days.",
        "responses": {
          "200": {
            "description": "Archived file store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileStore"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/file-stores/{id}/files": {
      "get": {
        "operationId": "fileStore.files.list",
        "summary": "List files in a file store",
        "tags": [
          "File Stores"
        ],
        "description": "Lists finalized files under the given prefix. Reads can be stale relative to a live mount: a sandbox holding an unflushed write to the same path may not have uploaded it yet, and a mount can serve a cached read of a file another writer has since changed (bounded by the mount's cache windows).",
        "responses": {
          "200": {
            "description": "Files under the given prefix",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FileStoreFile"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "prefix",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 1000
            }
          }
        ]
      },
      "delete": {
        "operationId": "fileStore.files.delete",
        "summary": "Delete a file",
        "tags": [
          "File Stores"
        ],
        "description": "Deletes a file from the store. This does not coordinate with live sandbox mounts: a sandbox holding an unflushed write to the same path can re-create the file after this delete lands.",
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/file-stores/{id}/files/presign-download": {
      "get": {
        "operationId": "fileStore.files.presignDownload",
        "summary": "Get a presigned GET URL for a file",
        "tags": [
          "File Stores"
        ],
        "description": "Returns a presigned GET URL for a file. Content can be stale relative to a live mount: a mount may serve a cached read of a file another writer has changed, and a sandbox's own unflushed write may not be reflected yet (bounded by the mount's cache windows).",
        "responses": {
          "200": {
            "description": "Presigned download URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorePresignResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "expiresInSeconds",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          }
        ]
      }
    },
    "/api/file-stores/{id}/files/uploads": {
      "post": {
        "operationId": "fileStore.files.startUpload",
        "summary": "Start a presigned upload",
        "tags": [
          "File Stores"
        ],
        "description": "Starts a presigned upload. The returned URL uploads bytes to a private staging area outside the store — the file is invisible to workspaces and absent from the store's file list until finalize promotes it. Returns an uploadId that finalize requires. For small files a tool can call, prefer PUT /:id/files/content.",
        "responses": {
          "200": {
            "description": "Presigned PUT URL the browser uploads to directly",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreStartUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "minLength": 1
                  },
                  "size": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 52428800
                  },
                  "contentType": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "size"
                ]
              }
            }
          }
        }
      }
    },
    "/api/file-stores/{id}/files/finalize": {
      "post": {
        "operationId": "fileStore.files.finalizeUpload",
        "summary": "Finalize an upload",
        "tags": [
          "File Stores"
        ],
        "description": "Finalizes a presigned upload identified by uploadId: stats the staged object, enforces the 50 MiB ceiling (over-limit objects are rejected and deleted), promotes it onto the store key, and fans the new file out to attached workspaces. Required — an unfinalized upload stays in staging, invisible to workspaces and the file list, and is reaped after 24 hours.",
        "responses": {
          "200": {
            "description": "Finalized file info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileStoreFile"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "minLength": 1
                  },
                  "uploadId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "path",
                  "uploadId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/file-stores/{id}/files/content": {
      "put": {
        "operationId": "fileStore.files.writeContent",
        "summary": "Write a small file directly",
        "tags": [
          "File Stores"
        ],
        "description": "Writes the raw request body to `path` in one call (no presign/finalize round-trip), capped at 5 MiB — the write path a tool-caller can use. Same path rules and workspace fan-out as a finalized upload. Use presigned uploads for larger files.",
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Written file info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileStoreFile"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/invitations/{id}/preview": {
      "get": {
        "operationId": "invitation.preview",
        "summary": "Preview an organization invitation",
        "tags": [
          "Invitations"
        ],
        "responses": {
          "200": {
            "description": "Presentation details and current state for an invitation link",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "expired",
                        "accepted",
                        "unavailable",
                        "invalid"
                      ]
                    },
                    "organization": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "logo": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "logo"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "inviter": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "email": {
                              "type": "string",
                              "format": "email",
                              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                            }
                          },
                          "required": [
                            "name",
                            "email"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "state",
                    "organization",
                    "inviter"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ]
      }
    },
    "/api/github/install": {
      "post": {
        "operationId": "github.install",
        "summary": "Begin installing the GitHub App for the caller's org",
        "tags": [
          "Github"
        ],
        "responses": {
          "200": {
            "description": "Authorization URL for the user to visit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubOAuthStartResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "returnTo",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "vaultId",
            "schema": {
              "type": "string"
            },
            "description": "Target vault for the resulting credential. Defaults to the caller's private default vault."
          }
        ]
      },
      "delete": {
        "operationId": "github.uninstall",
        "summary": "Disconnect the org's GitHub App installation",
        "tags": [
          "Github"
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/github/connect": {
      "post": {
        "operationId": "github.connect",
        "summary": "Begin connecting the caller's personal GitHub account",
        "tags": [
          "Github"
        ],
        "responses": {
          "200": {
            "description": "Authorization URL for the user to visit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubOAuthStartResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "returnTo",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "vaultId",
            "schema": {
              "type": "string"
            },
            "description": "Target vault for the resulting credential. Defaults to the caller's private default vault."
          }
        ]
      }
    },
    "/api/github/status": {
      "get": {
        "operationId": "github.status",
        "summary": "Report whether GitHub install + user OAuth are configured for the caller",
        "tags": [
          "Github"
        ],
        "responses": {
          "200": {
            "description": "GitHub configuration status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubStatus"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/github/repos": {
      "get": {
        "operationId": "github.repos",
        "summary": "Live-fetch repositories across the org's GitHub App installations",
        "tags": [
          "Github"
        ],
        "responses": {
          "200": {
            "description": "Repositories",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GithubRepo"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/github/mappings": {
      "get": {
        "operationId": "github.mappings.list",
        "summary": "List GitHub repo→project channel mappings for the org",
        "tags": [
          "Github"
        ],
        "responses": {
          "200": {
            "description": "Repo mappings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GithubRepoMapping"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/github/repos/{repoId}/mapping": {
      "put": {
        "operationId": "github.mapping.set",
        "summary": "Map a GitHub repo to a project (PR agent channel)",
        "tags": [
          "Github"
        ],
        "responses": {
          "204": {
            "description": "Mapped"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "repoId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "repoFullName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "projectId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "fallbackSenderUserId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prListenerEnabled": {
                    "default": false,
                    "type": "boolean"
                  },
                  "prListenerPrompt": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "installationId",
                  "repoFullName",
                  "projectId"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "github.mapping.unset",
        "summary": "Remove a GitHub repo→project mapping",
        "tags": [
          "Github"
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "repoId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "installationId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/google/status": {
      "get": {
        "operationId": "google.status",
        "summary": "Report the org's Google Workspace OAuth app configuration",
        "tags": [
          "Google"
        ],
        "responses": {
          "200": {
            "description": "Google Workspace configuration status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleWorkspaceStatus"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/google/config": {
      "put": {
        "operationId": "google.config.save",
        "summary": "Save the org's Google Workspace OAuth app credentials (BYO)",
        "tags": [
          "Google"
        ],
        "responses": {
          "200": {
            "description": "Updated Google Workspace configuration status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleWorkspaceStatus"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientSecret": {
                    "type": "string",
                    "minLength": 1
                  },
                  "scopes": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "clientId",
                  "clientSecret"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "google.config.delete",
        "summary": "Remove the org's Google Workspace OAuth app configuration",
        "tags": [
          "Google"
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/google/vaults/{vaultId}/connect": {
      "post": {
        "operationId": "google.connect",
        "summary": "Begin connecting a Google Workspace account into the given vault",
        "tags": [
          "Google"
        ],
        "responses": {
          "200": {
            "description": "Authorization URL for the user to visit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleWorkspaceOAuthStartResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "returnTo",
            "schema": {
              "type": "string"
            }
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "vaultId",
            "required": true
          }
        ]
      },
      "delete": {
        "operationId": "google.disconnect",
        "summary": "Disconnect the Google Workspace account stored in the given vault",
        "tags": [
          "Google"
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "vaultId",
            "required": true
          }
        ]
      }
    },
    "/api/inference/providers": {
      "get": {
        "operationId": "inference.providers.list",
        "summary": "List available inference services and authentication methods",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Services Ren can invoke and the authentication methods each accepts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailableInferenceService"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/inference/connections": {
      "get": {
        "operationId": "inference.connections.list",
        "summary": "List organization inference connections and subscriptions",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Credential state with nested service subscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InferenceConnection"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/inference/connections/{id}": {
      "get": {
        "operationId": "inference.connections.get",
        "summary": "Read one inference connection",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Credential state with nested service subscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceConnection"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ]
      }
    },
    "/api/inference/authorizations": {
      "post": {
        "operationId": "inference.authorizations.begin",
        "summary": "Begin connecting any inference service, whatever the provider asks for",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "What the person connecting has to do next, or the finished connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceAuthorization"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InferenceBeginAuthorizationInput"
              }
            }
          }
        }
      }
    },
    "/api/inference/authorizations/{id}": {
      "get": {
        "operationId": "inference.authorizations.poll",
        "summary": "Check whether a connection attempt has been approved",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Where the attempt has got to",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceAuthorization"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ]
      }
    },
    "/api/inference/authorizations/{id}/complete": {
      "post": {
        "operationId": "inference.authorizations.complete",
        "summary": "Finish a connection attempt that asked for a pasted code",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "The finished connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceAuthorization"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InferenceCompleteAuthorizationInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ]
      }
    },
    "/api/inference/subscriptions": {
      "get": {
        "operationId": "inference.subscriptions.list",
        "summary": "List organization subscriptions",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Subscription health and provider usage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InferenceSubscription"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/inference/subscriptions/budget": {
      "get": {
        "operationId": "inference.subscriptions.budget",
        "summary": "Estimate pooled subscription capacity",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Remaining capacity through the requested horizon or last known reset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceUsageBudgetEstimate"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "horizon",
            "schema": {
              "default": "5h",
              "type": "string",
              "enum": [
                "5h",
                "7d"
              ]
            }
          }
        ]
      }
    },
    "/api/inference/harnesses/codex/catalog": {
      "get": {
        "operationId": "inference.harnesses.codex.catalog",
        "summary": "List the Codex models Ren publishes, and the reasoning efforts each accepts",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "The published Codex models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceCodexCatalog"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/inference/subscriptions/{id}": {
      "patch": {
        "operationId": "inference.subscriptions.rename",
        "summary": "Rename a subscription",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "The renamed subscription",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceSubscription"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InferenceSubscriptionRenameInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ]
      },
      "delete": {
        "operationId": "inference.subscriptions.remove",
        "summary": "Remove a subscription",
        "tags": [
          "Inference"
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ]
      }
    },
    "/api/inference/keys": {
      "get": {
        "operationId": "inference.keys.list",
        "summary": "List inference keys",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "The caller's keys, or every key in the organization for admins",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InferenceKey"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "inference.keys.create",
        "summary": "Create an inference key",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "The new key; the secret is shown exactly once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceKeyCreated"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InferenceKeyCreateInput"
              }
            }
          }
        }
      }
    },
    "/api/inference/keys/{id}": {
      "delete": {
        "operationId": "inference.keys.revoke",
        "summary": "Revoke an inference key",
        "tags": [
          "Inference"
        ],
        "responses": {
          "204": {
            "description": "Revoked"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ]
      }
    },
    "/api/oauth-apps": {
      "get": {
        "operationId": "oauthApp.list",
        "summary": "List the org's OAuth apps",
        "tags": [
          "Oauth Apps"
        ],
        "responses": {
          "200": {
            "description": "OAuth apps",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OAuthApp"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "oauthApp.create",
        "summary": "Register an OAuth app the org owns",
        "tags": [
          "Oauth Apps"
        ],
        "responses": {
          "200": {
            "description": "Created app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthApp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthAppCreateInput"
              }
            }
          }
        }
      }
    },
    "/api/oauth-apps/redirect-uri": {
      "get": {
        "operationId": "oauthApp.redirectUri",
        "summary": "The redirect URI to register with an OAuth provider",
        "description": "Register this exact value as the app's authorized redirect URI before creating it — providers match it byte-for-byte and reject the login otherwise. It is deployment-specific, so read it here rather than assuming a host.",
        "tags": [
          "Oauth Apps"
        ],
        "responses": {
          "200": {
            "description": "Redirect URI",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthAppRedirectUri"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth-apps/{id}": {
      "patch": {
        "operationId": "oauthApp.update",
        "summary": "Update an OAuth app",
        "description": "Renaming an app that MCP servers point at is refused unless ?force=true — they reference it by name.",
        "tags": [
          "Oauth Apps"
        ],
        "responses": {
          "200": {
            "description": "Updated app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthApp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^oap_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "force",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthAppUpdateInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "oauthApp.delete",
        "summary": "Archive an OAuth app",
        "tags": [
          "Oauth Apps"
        ],
        "responses": {
          "204": {
            "description": "Archived"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^oap_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "force",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/oauth-apps/{id}/usage": {
      "get": {
        "operationId": "oauthApp.usage",
        "summary": "List the MCP servers that point at this OAuth app",
        "tags": [
          "Oauth Apps"
        ],
        "responses": {
          "200": {
            "description": "Usage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthAppUsage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^oap_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/mcps": {
      "post": {
        "operationId": "mcp.create",
        "summary": "Create an MCP",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "Created MCP",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCP"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9-]+$",
                    "description": "URL-friendly identifier"
                  },
                  "description": {
                    "default": "",
                    "type": "string"
                  },
                  "icon": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mcpServerUrl": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "docUrl": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "default": "remote",
                    "type": "string",
                    "enum": [
                      "remote",
                      "local"
                    ]
                  },
                  "command": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "args": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cwd": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "timeout": {
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/McpTimeout"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "env": {
                    "default": {},
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "requiredCredentials": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RequiredCredential"
                    }
                  },
                  "version": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "repository": {
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Repository"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tools": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "prompts": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "auth": {
                    "default": "none",
                    "description": "Ignored on write — derived from authConfig, which is the single source of truth for auth shape.",
                    "type": "string",
                    "enum": [
                      "none",
                      "oauth",
                      "api_key",
                      "basic",
                      "mcp_provider"
                    ]
                  },
                  "authConfig": {
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/McpAuthConfig"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "setup": {
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Setup"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tags": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  },
                  "allowDuplicateUrl": {
                    "default": false,
                    "description": "Register this URL even though another MCP already uses it — a second account on the same server.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "mcp.list",
        "summary": "List MCPs",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "List of MCPs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MCP"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string",
              "enum": [
                "popular",
                "trending",
                "recent"
              ]
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "pod",
                "org"
              ]
            }
          }
        ]
      }
    },
    "/api/mcps/search": {
      "post": {
        "operationId": "mcp.search",
        "summary": "Search MCPs across private, org, and published tiers",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "Matching MCPs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SearchResult"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string"
                  },
                  "sources": {
                    "default": [
                      "user",
                      "org",
                      "registry"
                    ],
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "user",
                        "org",
                        "registry"
                      ]
                    }
                  },
                  "limit": {
                    "default": 20,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/mcps/slug/{slug}": {
      "get": {
        "operationId": "mcp.getBySlug",
        "summary": "Get an MCP by slug",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "MCP details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCP"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-z0-9-]+$"
            },
            "required": true,
            "description": "URL-friendly identifier"
          }
        ]
      }
    },
    "/api/mcps/{id}": {
      "get": {
        "operationId": "mcp.get",
        "summary": "Get an MCP",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "MCP details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCP"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "mcp.update",
        "summary": "Update an MCP",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "Updated MCP",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCP"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mcpServerUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "docUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "remote",
                      "local"
                    ]
                  },
                  "command": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cwd": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "timeout": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/McpTimeout"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "env": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "requiredCredentials": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RequiredCredential"
                    }
                  },
                  "version": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "repository": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Repository"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "prompts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "auth": {
                    "type": "string",
                    "enum": [
                      "none",
                      "oauth",
                      "api_key",
                      "basic",
                      "mcp_provider"
                    ]
                  },
                  "authConfig": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/McpAuthConfig"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "websiteMetadata": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/WebsiteMetadata"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "setup": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Setup"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tags": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/mcps/{id}/archive": {
      "post": {
        "operationId": "mcp.archive",
        "summary": "Archive an MCP",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "Archived MCP",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCP"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/mcps/{id}/publish": {
      "post": {
        "operationId": "mcp.publish",
        "summary": "Publish an MCP",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "Published MCP",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCP"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/mcps/{id}/promote": {
      "post": {
        "operationId": "mcp.promote",
        "summary": "Promote a private MCP to org scope in place",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "Promoted MCP",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCP"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/mcps/{id}/deprecate": {
      "post": {
        "operationId": "mcp.deprecate",
        "summary": "Deprecate an MCP",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "Deprecated MCP",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCP"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/mcps/{id}/undeprecate": {
      "post": {
        "operationId": "mcp.undeprecate",
        "summary": "Undeprecate an MCP",
        "tags": [
          "Mcps"
        ],
        "responses": {
          "200": {
            "description": "Undeprecated MCP",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCP"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/me": {
      "get": {
        "operationId": "me.get",
        "summary": "Get the authenticated principal",
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "Resolved auth context",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/me/persona": {
      "patch": {
        "operationId": "me.updatePersona",
        "summary": "Update the active member persona",
        "description": "Sets the authenticated user's persona for their active organization membership.",
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "Persona updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberPersonaUpdate"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "persona": {
                    "$ref": "#/components/schemas/MemberPersona"
                  }
                },
                "required": [
                  "persona"
                ]
              }
            }
          }
        }
      }
    },
    "/api/me/onboarding": {
      "post": {
        "operationId": "me.completeOnboarding",
        "summary": "Mark member onboarding complete",
        "description": "Stamps the authenticated member as onboarded for their active organization.",
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "Onboarding recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingComplete"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "timezone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/memory-stores": {
      "post": {
        "operationId": "memoryStore.create",
        "summary": "Create a memory store",
        "tags": [
          "Memory Stores"
        ],
        "responses": {
          "200": {
            "description": "Created memory store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryStore"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "default": "",
                    "type": "string"
                  },
                  "isDefault": {
                    "default": false,
                    "type": "boolean"
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "memoryStore.list",
        "summary": "List memory stores",
        "tags": [
          "Memory Stores"
        ],
        "responses": {
          "200": {
            "description": "List of memory stores",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MemoryStore"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "org"
              ]
            }
          }
        ]
      }
    },
    "/api/memory-stores/{id}": {
      "get": {
        "operationId": "memoryStore.get",
        "summary": "Get a memory store",
        "tags": [
          "Memory Stores"
        ],
        "responses": {
          "200": {
            "description": "memory store details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryStore"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "memoryStore.update",
        "summary": "Update a memory store",
        "tags": [
          "Memory Stores"
        ],
        "responses": {
          "200": {
            "description": "Updated memory store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryStore"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/memory-stores/{id}/archive": {
      "post": {
        "operationId": "memoryStore.archive",
        "summary": "Archive a memory store",
        "tags": [
          "Memory Stores"
        ],
        "description": "Archives the store metadata but keeps every stored object. Bytes remain recoverable until a retention sweep purges stores archived more than 30 days.",
        "responses": {
          "200": {
            "description": "Archived memory store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryStore"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/memory-stores/{id}/files": {
      "get": {
        "operationId": "memoryStore.files.list",
        "summary": "List files in a memory store",
        "tags": [
          "Memory Stores"
        ],
        "description": "Lists finalized files under the given prefix. Reads can be stale relative to a live mount: a sandbox holding an unflushed write to the same path may not have uploaded it yet, and a mount can serve a cached read of a file another writer has since changed (bounded by the mount's cache windows).",
        "responses": {
          "200": {
            "description": "Files under the given prefix",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MemoryStoreFile"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "prefix",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 1000
            }
          }
        ]
      },
      "delete": {
        "operationId": "memoryStore.files.delete",
        "summary": "Delete a file",
        "tags": [
          "Memory Stores"
        ],
        "description": "Deletes a file from the store. This does not coordinate with live sandbox mounts: a sandbox holding an unflushed write to the same path can re-create the file after this delete lands.",
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/memory-stores/{id}/files/presign-download": {
      "get": {
        "operationId": "memoryStore.files.presignDownload",
        "summary": "Get a presigned GET URL for a file",
        "tags": [
          "Memory Stores"
        ],
        "description": "Returns a presigned GET URL for a file. Content can be stale relative to a live mount: a mount may serve a cached read of a file another writer has changed, and a sandbox's own unflushed write may not be reflected yet (bounded by the mount's cache windows).",
        "responses": {
          "200": {
            "description": "Presigned download URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorePresignResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "expiresInSeconds",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          }
        ]
      }
    },
    "/api/memory-stores/{id}/files/uploads": {
      "post": {
        "operationId": "memoryStore.files.startUpload",
        "summary": "Start a presigned upload",
        "tags": [
          "Memory Stores"
        ],
        "description": "Starts a presigned upload. The returned URL uploads bytes to a private staging area outside the store — the file is invisible to workspaces and absent from the store's file list until finalize promotes it. Returns an uploadId that finalize requires. For small files a tool can call, prefer PUT /:id/files/content.",
        "responses": {
          "200": {
            "description": "Presigned PUT URL the browser uploads to directly",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreStartUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "minLength": 1
                  },
                  "size": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 52428800
                  },
                  "contentType": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "size"
                ]
              }
            }
          }
        }
      }
    },
    "/api/memory-stores/{id}/files/finalize": {
      "post": {
        "operationId": "memoryStore.files.finalizeUpload",
        "summary": "Finalize an upload",
        "tags": [
          "Memory Stores"
        ],
        "description": "Finalizes a presigned upload identified by uploadId: stats the staged object, enforces the 50 MiB ceiling (over-limit objects are rejected and deleted), promotes it onto the store key, and fans the new file out to attached workspaces. Required — an unfinalized upload stays in staging, invisible to workspaces and the file list, and is reaped after 24 hours.",
        "responses": {
          "200": {
            "description": "Finalized file info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryStoreFile"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "minLength": 1
                  },
                  "uploadId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "path",
                  "uploadId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/memory-stores/{id}/files/content": {
      "put": {
        "operationId": "memoryStore.files.writeContent",
        "summary": "Write a small file directly",
        "tags": [
          "Memory Stores"
        ],
        "description": "Writes the raw request body to `path` in one call (no presign/finalize round-trip), capped at 5 MiB — the write path a tool-caller can use. Same path rules and workspace fan-out as a finalized upload. Use presigned uploads for larger files.",
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Written file info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryStoreFile"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/models": {
      "get": {
        "operationId": "model.list",
        "summary": "List available LLM models grouped by provider",
        "tags": [
          "Models"
        ],
        "responses": {
          "200": {
            "description": "Grouped model list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/onboarding/reward": {
      "post": {
        "operationId": "onboarding.reward",
        "summary": "Claim onboarding composer credits",
        "tags": [
          "Onboarding"
        ],
        "responses": {
          "200": {
            "description": "Whether the composer reward was granted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingReward"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/onboarding/start": {
      "post": {
        "operationId": "onboarding.start",
        "summary": "Start onboarding chat with Ren agent",
        "description": "Starts a background session-creation job on the user's private pod Ren project and prepares the initial prompt with selected MCP/skill context. Poll session.createStatus with the returned jobId.",
        "tags": [
          "Onboarding"
        ],
        "responses": {
          "200": {
            "description": "Session created and initial prompt prepared",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingStart"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  },
                  "skillIds": {
                    "default": [],
                    "maxItems": 64,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "mcpIds": {
                    "default": [],
                    "maxItems": 64,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "persona": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "channels": {
                    "default": [],
                    "maxItems": 16,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 32
                    }
                  }
                },
                "required": [
                  "prompt"
                ]
              }
            }
          }
        }
      }
    },
    "/api/onboarding/setup-personal-org": {
      "post": {
        "operationId": "onboarding.setupPersonalOrg",
        "summary": "Set up personal organization",
        "description": "Creates a personal organization for the authenticated user. Use when a new user has no membership yet — e.g. after skipping a pending invitation. Idempotent: returns the existing organization if the user already belongs to one. Name, slug, and logo are derived from the user's profile and email domain.",
        "tags": [
          "Onboarding"
        ],
        "responses": {
          "200": {
            "description": "Personal organization ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingSetupPersonalOrg"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/org": {
      "get": {
        "operationId": "org.get",
        "summary": "Get organization settings",
        "tags": [
          "Org"
        ],
        "responses": {
          "200": {
            "description": "Organization settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgSettings"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "org.update",
        "summary": "Update organization settings",
        "tags": [
          "Org"
        ],
        "responses": {
          "200": {
            "description": "Updated organization settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgSettings"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "defaultModel": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ModelSelection"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "instructions": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/organization-logos": {
      "post": {
        "operationId": "organizationLogo.upload",
        "summary": "Upload an organization logo",
        "tags": [
          "Organization Logos"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Persistent organization logo URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationLogoUpload"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/pats": {
      "post": {
        "operationId": "pat.create",
        "summary": "Create a personal access token",
        "tags": [
          "Pats"
        ],
        "responses": {
          "200": {
            "description": "Created PAT (token shown once)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pat": {
                      "$ref": "#/components/schemas/Pat"
                    },
                    "token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "pat",
                    "token"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "readonly",
                      "member",
                      "admin"
                    ]
                  },
                  "expiresAt": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "role"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "pat.list",
        "summary": "List personal access tokens",
        "tags": [
          "Pats"
        ],
        "responses": {
          "200": {
            "description": "List of PATs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Pat"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/pats/{id}/revoke": {
      "post": {
        "operationId": "pat.revoke",
        "summary": "Revoke a personal access token",
        "tags": [
          "Pats"
        ],
        "responses": {
          "200": {
            "description": "Revoked PAT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pat"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pat_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/pods": {
      "post": {
        "operationId": "pod.create",
        "summary": "Create a pod and provision its sandbox",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Created pod with freshly provisioned sandbox",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodWithSandbox"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "icon": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "environmentId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "default": "",
                    "type": "string"
                  },
                  "instructions": {
                    "default": "",
                    "type": "string"
                  },
                  "isPrivate": {
                    "default": true,
                    "type": "boolean"
                  },
                  "isDefault": {
                    "default": false,
                    "type": "boolean"
                  },
                  "presetTemplate": {
                    "$ref": "#/components/schemas/PresetTemplate"
                  },
                  "createDefaultProject": {
                    "default": true,
                    "type": "boolean"
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "pod.list",
        "summary": "List pods",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "List of pods",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Pod"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "orgId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "pod",
                "org"
              ]
            }
          }
        ]
      }
    },
    "/api/pods/{id}": {
      "get": {
        "operationId": "pod.get",
        "summary": "Get a pod",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Pod details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pod"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "pod.update",
        "summary": "Update a pod",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Updated pod",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pod"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "type": "string"
                  },
                  "isPrivate": {
                    "type": "boolean"
                  },
                  "environmentId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "defaultModel": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ModelSelection"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "instructions": {
                    "type": "string"
                  },
                  "presetTemplate": {
                    "$ref": "#/components/schemas/PresetTemplate"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/pods/{id}/usage": {
      "get": {
        "operationId": "pod.usage",
        "summary": "Get a pod's credit usage",
        "description": "Ren credits consumed across the whole pod, with a per-day trend, a breakdown by usage source and operation, and an optional grouped breakdown (e.g. `groupBy=project` for per-project costs). `start`/`end` bound the range (max 92 days); omit both for all-time. Served from the local hourly usage rollup.",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Pod credit usage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "groupBy",
            "schema": {
              "type": "string",
              "enum": [
                "user",
                "member",
                "agent",
                "model",
                "session",
                "project",
                "pod",
                "source",
                "servedBy"
              ]
            }
          },
          {
            "in": "query",
            "name": "start",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            }
          },
          {
            "in": "query",
            "name": "end",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            }
          }
        ]
      }
    },
    "/api/pods/{id}/archive": {
      "post": {
        "operationId": "pod.archive",
        "summary": "Archive a pod",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Archived pod",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pod"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/pods/{id}/members": {
      "get": {
        "operationId": "pod.member.list",
        "summary": "List pod members",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "List of members",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PodMember"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "post": {
        "operationId": "pod.member.add",
        "summary": "Add a member to a pod",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Added member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodMember"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "pattern": "^usr_[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "role": {
                    "default": "member",
                    "type": "string",
                    "enum": [
                      "owner",
                      "member"
                    ]
                  }
                },
                "required": [
                  "userId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/pods/{id}/members/{userId}": {
      "delete": {
        "operationId": "pod.member.remove",
        "summary": "Remove a member from a pod",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Removed member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodMember"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "pattern": "^usr_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/pods/{id}/credentials": {
      "get": {
        "operationId": "pod.credential.list",
        "summary": "List the credentials this pod resolves against, best match first",
        "description": "Read-only. Derived from the pod's tier: a shared pod sees its own vault then the org vault; a private pod sees its owner's vault, then every shared pod that owner belongs to, then the org vault. Entries shadowed by a higher-priority credential are marked rather than hidden.",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Resolved credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodCredentials"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/pods/{id}/auth-requirements": {
      "get": {
        "operationId": "pod.authRequirements",
        "summary": "List the credentials this pod's agents, skills and MCPs require",
        "description": "Read-only. Aggregated across every project in the pod, so it answers 'what does this team still need' without picking a session. `satisfied` is evaluated against the pod's whole vault chain, so a credential held at org level counts as met. `neededBy` names the skills and MCPs that asked for each one.",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Required credentials and whether each is satisfied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthRequirements"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/pods/{podId}/sandbox/provision": {
      "post": {
        "operationId": "pod.sandbox.provision",
        "summary": "Kick off provisioning for the pod's sandbox",
        "description": "Starts a durable workflow that resumes the paused sandbox or provisions a fresh one. Idempotent: concurrent calls join the running workflow. Returns immediately; poll GET /status until status is 'ready'.",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Workflow started or joined",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodSandboxProvisionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/pods/{podId}/sandbox/teardown": {
      "post": {
        "operationId": "pod.sandbox.teardown",
        "summary": "Destroy the pod's current sandbox",
        "description": "Tears down the pod's current sandbox: aborts all running sessions and discards files not persisted to a store. Does not provision a replacement — the next session start (or POST /provision) brings up a fresh one.",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Teardown result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodSandboxTeardownResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/pods/{podId}/sandbox/status": {
      "get": {
        "operationId": "pod.sandbox.status",
        "summary": "Read the pod's sandbox provisioning status",
        "description": "Returns 'ready' once the sandbox is provisioned/resumed and credentials are available; 'provisioning' while the workflow is in flight; 'absent' if no workflow has been started and no sandbox is linked; 'failed' if the workflow terminated unhealthy.",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Current sandbox state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodSandboxStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/pods/{podId}/databases": {
      "post": {
        "operationId": "podDatabase.create",
        "summary": "Create a pod database",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Created pod database",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodDatabase"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9-]+$",
                    "description": "URL-friendly identifier"
                  },
                  "description": {
                    "default": "",
                    "type": "string",
                    "maxLength": 4096
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "podDatabase.list",
        "summary": "List a pod's databases",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Pod databases",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PodDatabase"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/pods/{podId}/databases/{id}": {
      "get": {
        "operationId": "podDatabase.get",
        "summary": "Get a pod database",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Pod database details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodDatabase"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pdb_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "podDatabase.update",
        "summary": "Update a pod database",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Updated pod database",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodDatabase"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pdb_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/pods/{podId}/databases/{id}/archive": {
      "post": {
        "operationId": "podDatabase.archive",
        "summary": "Archive a pod database, keeping its S3 replica restorable",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Archived pod database",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PodDatabase"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pdb_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/pods/{podId}/artifacts": {
      "post": {
        "operationId": "artifact.create",
        "summary": "Create an artifact",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Created artifact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Artifact"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9-]+$",
                    "description": "URL-friendly identifier"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "sourceSessionId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "slug",
                  "title"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "artifact.list",
        "summary": "List a pod's artifacts",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Pod artifacts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Artifact"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/pods/{podId}/artifacts/{id}": {
      "get": {
        "operationId": "artifact.get",
        "summary": "Get an artifact",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "The artifact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Artifact"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^art_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "artifact.update",
        "summary": "Update an artifact",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Updated artifact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Artifact"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^art_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/pods/{podId}/artifacts/{id}/archive": {
      "post": {
        "operationId": "artifact.archive",
        "summary": "Archive an artifact, keeping its S3 files as a backup",
        "tags": [
          "Pods"
        ],
        "responses": {
          "200": {
            "description": "Archived artifact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Artifact"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^art_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/projects": {
      "post": {
        "operationId": "project.create",
        "summary": "Create a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Created project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "podId": {
                    "type": "string",
                    "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "icon": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "default": "",
                    "type": "string"
                  },
                  "instructions": {
                    "default": "",
                    "type": "string"
                  },
                  "permission": {
                    "$ref": "#/components/schemas/PermissionConfig"
                  },
                  "gitRepos": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ProjectGitRepo"
                    }
                  },
                  "references": {
                    "$ref": "#/components/schemas/ProjectReferences"
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  }
                },
                "required": [
                  "podId",
                  "name"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "project.list",
        "summary": "List projects",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "List of projects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "podId",
            "schema": {
              "type": "string",
              "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "pod",
                "org"
              ]
            }
          }
        ]
      }
    },
    "/api/projects/{id}": {
      "get": {
        "operationId": "project.get",
        "summary": "Get a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Project details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "project.update",
        "summary": "Update a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Updated project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "type": "string"
                  },
                  "permission": {
                    "$ref": "#/components/schemas/PermissionConfig"
                  },
                  "gitRepos": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ProjectGitRepo"
                    }
                  },
                  "references": {
                    "$ref": "#/components/schemas/ProjectReferences"
                  },
                  "defaultModel": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ModelSelection"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "instructions": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{id}/usage": {
      "get": {
        "operationId": "project.usage",
        "summary": "Get a project's credit usage",
        "description": "Ren credits consumed within the project, with a per-day trend, a breakdown by usage source and operation, and an optional grouped breakdown (e.g. `groupBy=session` for per-session costs). `start`/`end` bound the range (max 92 days); omit both for all-time. Served from the local hourly usage rollup.",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Project credit usage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "groupBy",
            "schema": {
              "type": "string",
              "enum": [
                "user",
                "member",
                "agent",
                "model",
                "session",
                "project",
                "pod",
                "source",
                "servedBy"
              ]
            }
          },
          {
            "in": "query",
            "name": "start",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            }
          },
          {
            "in": "query",
            "name": "end",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            }
          }
        ]
      }
    },
    "/api/projects/{id}/agents": {
      "get": {
        "operationId": "project.agent.list",
        "summary": "List agents attached to a project",
        "description": "Includes the auto-attached published \"ren\" meta agent (mode \"all\"), which project creation adds transactionally — it is present without any explicit project.agent.add call.",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "List of agent memberships",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectAgent"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "post": {
        "operationId": "project.agent.add",
        "summary": "Attach an agent to a project",
        "description": "Attaches an agent as a new placement. Re-attaching an already attached agent is a 409 — use project.agent.update to change its pin or mode. Note: creating a project auto-attaches the published \"ren\" meta agent with mode \"all\", so it appears in project.agent.list without an explicit add.",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Attached agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectAgent"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string",
                    "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "agentVersionId": {
                    "default": null,
                    "description": "Pin the placement to an exact agent version. null (the default) tracks the agent's latest live version; a set version ID must belong to this agent and not be archived.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mode": {
                    "default": "all",
                    "description": "Opencode agent mode. \"subagent\" = the agent is only invocable as a subagent (reached via the task tool) and is isolated from project bindings it did not explicitly opt into; \"all\" = the agent is also directly selectable in the session and keeps its own bindings without isolation.",
                    "type": "string",
                    "enum": [
                      "subagent",
                      "all"
                    ]
                  }
                },
                "required": [
                  "agentId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/projects/{id}/agents/{agentId}": {
      "patch": {
        "operationId": "project.agent.update",
        "summary": "Update an agent's membership in a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Updated agent membership",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectAgent"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "agentId",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentVersionId": {
                    "description": "Pin the placement to an exact agent version. null (the default) tracks the agent's latest live version; a set version ID must belong to this agent and not be archived.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mode": {
                    "description": "Opencode agent mode. \"subagent\" = the agent is only invocable as a subagent (reached via the task tool) and is isolated from project bindings it did not explicitly opt into; \"all\" = the agent is also directly selectable in the session and keeps its own bindings without isolation.",
                    "type": "string",
                    "enum": [
                      "subagent",
                      "all"
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "project.agent.remove",
        "summary": "Detach an agent from a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Detached agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectAgent"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "agentId",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/projects/{id}/file-stores": {
      "get": {
        "operationId": "project.fileStore.list",
        "summary": "List file stores attached to a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "List of file store attachments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectFileStore"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "post": {
        "operationId": "project.fileStore.add",
        "summary": "Attach a file store to a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Attached file store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectFileStore"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileStoreId": {
                    "type": "string",
                    "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "fileStoreId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/projects/{id}/file-stores/{fileStoreId}": {
      "delete": {
        "operationId": "project.fileStore.remove",
        "summary": "Detach a file store from a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Detached file store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectFileStore"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "fileStoreId",
            "schema": {
              "type": "string",
              "pattern": "^fst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/projects/{id}/memory-stores": {
      "get": {
        "operationId": "project.memoryStore.list",
        "summary": "List memory stores attached to a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "List of memory store attachments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectMemoryStore"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "post": {
        "operationId": "project.memoryStore.add",
        "summary": "Attach a memory store to a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Attached memory store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectMemoryStore"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "memoryStoreId": {
                    "type": "string",
                    "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "memoryStoreId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/projects/{id}/memory-stores/{memoryStoreId}": {
      "delete": {
        "operationId": "project.memoryStore.remove",
        "summary": "Detach a memory store from a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Detached memory store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectMemoryStore"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "memoryStoreId",
            "schema": {
              "type": "string",
              "pattern": "^mst_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/projects/{id}/skills": {
      "get": {
        "operationId": "project.skill.list",
        "summary": "List skills attached to a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "List of project skill attachments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectSkill"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "post": {
        "operationId": "project.skill.add",
        "summary": "Attach a skill to a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Attached skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSkill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "skillId": {
                    "type": "string",
                    "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "skillVersionId": {
                    "default": null,
                    "description": "Pin to a specific version, or null to track the latest live version (highest wins) for this skill.",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^skv_[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "skillId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/projects/{id}/skills/resolution": {
      "get": {
        "operationId": "project.skill.resolution",
        "summary": "Resolve the one version served per skill in this project, with pin-conflict warnings",
        "description": "The server resolves one version per skill per project — highest live version wins (decision 5). When a bound pin loses, it is reported here as a warning (never an error at bind time): a pin can lose later when someone publishes a newer version, so there is no request to reject at that moment.",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Effective versions and pin-conflict warnings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSkillResolution"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/projects/{id}/skills/{skillId}": {
      "delete": {
        "operationId": "project.skill.remove",
        "summary": "Detach a skill from a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Detached skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSkill"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "skillId",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/projects/{id}/mcps": {
      "get": {
        "operationId": "project.mcp.list",
        "summary": "List MCPs attached to a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "List of project MCP attachments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectMcp"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "post": {
        "operationId": "project.mcp.add",
        "summary": "Attach an MCP to a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Attached MCP",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectMcp"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mcpId": {
                    "type": "string",
                    "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "mcpId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/projects/{id}/mcps/{mcpId}": {
      "delete": {
        "operationId": "project.mcp.remove",
        "summary": "Detach an MCP from a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Detached MCP",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectMcp"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "mcpId",
            "schema": {
              "type": "string",
              "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/projects/{id}/archive": {
      "post": {
        "operationId": "project.archive",
        "summary": "Archive a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Archived project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/publishers/me": {
      "get": {
        "operationId": "publisher.me",
        "summary": "Get the caller's accessible publishers",
        "tags": [
          "Publishers"
        ],
        "responses": {
          "200": {
            "description": "Caller's org publisher",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublisherMe"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/publishers/org": {
      "post": {
        "operationId": "publisher.claimOrg",
        "summary": "Claim the caller's org publisher handle",
        "tags": [
          "Publishers"
        ],
        "responses": {
          "200": {
            "description": "Org publisher",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Publisher"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9-]+$",
                    "description": "URL-friendly identifier"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/publishers/{id}": {
      "get": {
        "operationId": "publisher.get",
        "summary": "Get a publisher",
        "tags": [
          "Publishers"
        ],
        "responses": {
          "200": {
            "description": "Publisher",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Publisher"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pub_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "publisher.update",
        "summary": "Update publisher metadata",
        "tags": [
          "Publishers"
        ],
        "responses": {
          "200": {
            "description": "Updated publisher",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Publisher"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^pub_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avatar": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublisherLink"
                    }
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9-]+$",
                    "description": "URL-friendly identifier"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/replays": {
      "post": {
        "operationId": "replay.create",
        "summary": "Create a replay",
        "tags": [
          "Replays"
        ],
        "responses": {
          "200": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Replay"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string"
                  },
                  "publisherId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "websiteMetadata": {
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/WebsiteMetadata"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "shareToken": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  }
                },
                "required": [
                  "sessionId"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "replay.list",
        "summary": "List replays",
        "tags": [
          "Replays"
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Replay"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "publisherId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "pod",
                "org"
              ]
            }
          }
        ]
      }
    },
    "/api/replays/{id}": {
      "get": {
        "operationId": "replay.get",
        "summary": "Get a replay",
        "tags": [
          "Replays"
        ],
        "responses": {
          "200": {
            "description": "Details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Replay"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^rpl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "replay.update",
        "summary": "Update a replay",
        "tags": [
          "Replays"
        ],
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Replay"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^rpl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "websiteMetadata": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/WebsiteMetadata"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/replays/{id}/archive": {
      "post": {
        "operationId": "replay.archive",
        "summary": "Archive a replay",
        "tags": [
          "Replays"
        ],
        "responses": {
          "200": {
            "description": "Archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Replay"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^rpl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/replays/{id}/publish": {
      "post": {
        "operationId": "replay.publish",
        "summary": "Publish a replay",
        "tags": [
          "Replays"
        ],
        "responses": {
          "200": {
            "description": "Published replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Replay"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^rpl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/replays/{id}/deprecate": {
      "post": {
        "operationId": "replay.deprecate",
        "summary": "Deprecate a replay",
        "tags": [
          "Replays"
        ],
        "responses": {
          "200": {
            "description": "Deprecated replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Replay"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^rpl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/replays/{id}/undeprecate": {
      "post": {
        "operationId": "replay.undeprecate",
        "summary": "Undeprecate a replay",
        "tags": [
          "Replays"
        ],
        "responses": {
          "200": {
            "description": "Undeprecated replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Replay"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^rpl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/replays/share": {
      "post": {
        "operationId": "replay.share",
        "summary": "Share a chat session as a public replay",
        "tags": [
          "Replays"
        ],
        "responses": {
          "200": {
            "description": "Shared replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Replay"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string"
                  },
                  "websiteMetadata": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/WebsiteMetadata"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "sessionId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/resource-icons": {
      "post": {
        "operationId": "resourceIcon.upload",
        "summary": "Upload a resource icon image",
        "tags": [
          "Resource Icons"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Persistent resource icon URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceIconUpload"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions": {
      "post": {
        "operationId": "session.create",
        "summary": "Create a session",
        "description": "Starts an async, sandbox-warming session creation job and returns a jobId to poll via session.createStatus.",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Session creation job accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionCreateJob"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Out of credits",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "podId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "projectId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                },
                "required": [
                  "podId",
                  "projectId",
                  "title"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "session.list",
        "summary": "List sessions",
        "description": "Scoped to the calling user: pods they are a member of, then the projects visible to them in those pods. Requires a user-attributed token.",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "List of sessions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpencodeSession"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "podId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "createdById",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "$ref": "#/components/schemas/SessionSource"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "in": "query",
            "name": "sourceId",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "in": "query",
            "name": "topLevel",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "attention",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "mine",
            "schema": {
              "type": "boolean"
            },
            "description": "Sessions created by or containing messages from the signed-in user"
          }
        ]
      }
    },
    "/api/sessions/jobs/{jobId}": {
      "get": {
        "operationId": "session.createStatus",
        "summary": "Poll a session creation job",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Session creation job status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionCreateStatus"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "jobId",
            "schema": {
              "type": "string",
              "pattern": "^sjob_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/sessions/{id}": {
      "get": {
        "operationId": "session.get",
        "summary": "Get a session",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Session details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpencodeSession"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "session.update",
        "summary": "Update a session",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Updated session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpencodeSession"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "shareUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "summaryAdditions": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "summaryDeletions": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "summaryFiles": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "idle",
                      "busy",
                      "waiting",
                      "error"
                    ]
                  },
                  "error": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "details": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currentAgentSlug": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{id}/source-link": {
      "get": {
        "operationId": "session.sourceLink",
        "summary": "Get the original channel conversation link",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Source link, or null when unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionSourceLink"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/sessions/{id}/url": {
      "get": {
        "operationId": "session.url",
        "summary": "Get the OpenCode URL for a session",
        "description": "Returns the session's OpenCode endpoint. `url` is the bare (Basic-auth protected) web-UI deep link; `authedUrl` embeds the credential as an `auth_token` query param for one-call access — treat it as a secret since it is equivalent to the password. `serverUrl` is the bare server origin — pass it to `opencode attach <serverUrl> --session <id>` (its URL arg is the SDK base, so a deep link would break). `serverPassword`/`username` are provided so callers can build their own Basic auth header instead.",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "OpenCode URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionUrlResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/sessions/{id}/messages": {
      "get": {
        "operationId": "session.messages.list",
        "summary": "List a session's messages",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Paginated session messages",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionMessagesPage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "pageNumber",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ]
      }
    },
    "/api/sessions/{id}/traces": {
      "get": {
        "operationId": "session.traces.list",
        "summary": "Read a session's execution traces (Langfuse)",
        "description": "Returns the Langfuse traces for a session the caller can access (model calls, tool calls, errors, latency, cost). Compact by default; pass fields=io,observations to expand. Returns configured=false when observability is not set up.",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Session traces",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionTracesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "fields",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Langfuse field groups to include: core (always), io, scores, observations, metrics"
          }
        ]
      }
    },
    "/api/sessions/{id}/usage": {
      "get": {
        "operationId": "session.usage",
        "summary": "Get a session's credit usage",
        "description": "Total Ren credits consumed by this session and all of its child/subagent sessions, with a breakdown by usage source and operation. Served from the local hourly usage rollup; the value may lag live spend by up to roughly one hour plus a meter cycle.",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Session credit usage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/sessions/{id}/auth-requirements": {
      "get": {
        "operationId": "session.authRequirements",
        "summary": "Compute MCP and skill credential requirements for a session",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Auth requirements with satisfaction flags",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthRequirements"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/sessions/{id}/archive": {
      "post": {
        "operationId": "session.archive",
        "summary": "Archive a session",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Archived session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpencodeSession"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/sessions/{id}/files/presign-upload": {
      "post": {
        "operationId": "session.files.presignUpload",
        "summary": "Presign an upload URL for a file destined for the session's pod volume",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Presigned upload URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionFilesPresignUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "minLength": 1
                  },
                  "contentType": {
                    "type": "string",
                    "minLength": 1
                  },
                  "size": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "filename",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        }
      }
    },
    "/api/sessions/{id}/files/presign-download": {
      "post": {
        "operationId": "session.files.presignDownload",
        "summary": "Presign a download URL for a file in the session's pod volume",
        "tags": [
          "Sessions"
        ],
        "responses": {
          "200": {
            "description": "Presigned download URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionFilesPresignDownloadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionVolumeRef"
              }
            }
          }
        }
      }
    },
    "/api/skills": {
      "post": {
        "operationId": "skill.create",
        "summary": "Create a skill",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Created skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "nameOverride": {
                    "description": "Overrides the name declared in SKILL.md.",
                    "type": "string",
                    "minLength": 1
                  },
                  "descriptionOverride": {
                    "description": "Overrides the description declared in SKILL.md.",
                    "type": "string"
                  },
                  "icon": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "docUrl": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "repository": {
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Repository"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "websiteMetadata": {
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/WebsiteMetadata"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "setup": {
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Setup"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "version": {
                    "type": "string"
                  },
                  "releaseNotes": {
                    "type": "string"
                  },
                  "requiredCredentials": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/SkillRequiredCredential"
                    }
                  },
                  "tags": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "files": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Relative path within the skill folder. No leading slash or '..' segments."
                        },
                        "contentBase64": {
                          "type": "string",
                          "format": "base64",
                          "contentEncoding": "base64",
                          "pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
                          "description": "Base64-encoded file bytes. Per-file decoded size max 10 MB."
                        }
                      },
                      "required": [
                        "path",
                        "contentBase64"
                      ]
                    },
                    "description": "Skill folder as base64-encoded files. A root SKILL.md is required. Total decoded size max 10 MB."
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "git"
                      },
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "HTTPS git repository URL (https:// only). Public repos are cloned directly; private repos use the org's GitHub installation."
                      },
                      "ref": {
                        "description": "Branch, tag, or commit to mirror. Omitted = the remote's default branch (HEAD). Floating refs are re-resolved at index build time.",
                        "type": "string"
                      },
                      "path": {
                        "description": "Subdirectory containing SKILL.md, relative to the repo root. No leading slash or '..' segments.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "url"
                    ]
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "skill.list",
        "summary": "List and search skills",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "List of skills",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Skill"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string",
              "enum": [
                "popular",
                "trending",
                "recent"
              ]
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "pod",
                "org"
              ]
            },
            "description": "Restrict to a single visibility tier within the caller's scope."
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive match across name, slug, and description."
          },
          {
            "in": "query",
            "name": "published",
            "schema": {
              "type": "boolean"
            },
            "description": "true = only published (registry) skills; false = only unpublished."
          },
          {
            "in": "query",
            "name": "publisherId",
            "schema": {
              "type": "string"
            },
            "description": "Restrict to skills carried by a specific publisher."
          },
          {
            "in": "query",
            "name": "tagged",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "description": "Only skills carrying every one of these tags. Repeat the param for multiple tags."
          }
        ]
      }
    },
    "/api/skills/{idOrSlug}": {
      "get": {
        "operationId": "skill.get",
        "summary": "Get a skill by ID or slug",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Skill details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "idOrSlug",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
                },
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[a-z0-9-]+$",
                  "description": "URL-friendly identifier"
                }
              ]
            },
            "required": true
          }
        ]
      }
    },
    "/api/skills/{id}": {
      "patch": {
        "operationId": "skill.update",
        "summary": "Update skill metadata",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Updated skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "Registry display name. Editing it does not change any version's SKILL.md.",
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "description": "Registry description. Editing it does not change any version's SKILL.md.",
                    "type": "string"
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "docUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "repository": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Repository"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "websiteMetadata": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/WebsiteMetadata"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "setup": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Setup"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tags": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/skills/{id}/archive": {
      "post": {
        "operationId": "skill.archive",
        "summary": "Archive a skill",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Archived skill with the blast radius of agents and projects that referenced it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillArchiveResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/skills/{id}/source": {
      "post": {
        "operationId": "skill.source.update",
        "summary": "Update a git skill's source pointer",
        "description": "Repoints a git-backed skill at a different repository, ref or subdirectory. Git skills are versionless — GitHub owns their history — so this replaces the pointer in place rather than cutting a version, and existing pins keep resolving. The new pointer is validated by mirroring it, and a published skill's repository must still be publicly cloneable. File-backed skills have no pointer; use versions instead.",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Updated skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "git"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "HTTPS git repository URL (https:// only). Public repos are cloned directly; private repos use the org's GitHub installation."
                  },
                  "ref": {
                    "description": "Branch, tag, or commit to mirror. Omitted = the remote's default branch (HEAD). Floating refs are re-resolved at index build time.",
                    "type": "string"
                  },
                  "path": {
                    "description": "Subdirectory containing SKILL.md, relative to the repo root. No leading slash or '..' segments.",
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "url"
                ]
              }
            }
          }
        }
      }
    },
    "/api/skills/{id}/publish": {
      "post": {
        "operationId": "skill.publish",
        "summary": "Publish a skill",
        "description": "Publishing changes copyability (the skill enters the registry), not materialisation: it does NOT fan out to sandboxes. A git-backed skill's repository must be publicly cloneable (decision 11).",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Published skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/skills/{id}/deprecate": {
      "post": {
        "operationId": "skill.deprecate",
        "summary": "Deprecate a skill",
        "description": "Deprecation is an adoption signal only — it does NOT affect materialisation: sandboxes already tracking the skill keep receiving it. Use archive to remove a skill from sandboxes.",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Deprecated skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/skills/{id}/undeprecate": {
      "post": {
        "operationId": "skill.undeprecate",
        "summary": "Undeprecate a skill",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Undeprecated skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/skills/{id}/copy": {
      "post": {
        "operationId": "skill.copy",
        "summary": "Copy a skill",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Copied skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/api/skills/{id}/promote": {
      "post": {
        "operationId": "skill.promote",
        "summary": "Promote a private skill to org scope in place",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Promoted skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/skills/{id}/versions": {
      "post": {
        "operationId": "skill.version.create",
        "summary": "Create a skill version",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Created skill version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillVersion"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "default": "patch",
                    "description": "Either an explicit semver string (e.g. \"1.2.0\") or a bump keyword (\"major\" | \"minor\" | \"patch\") applied to the latest live version.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "major",
                          "minor",
                          "patch"
                        ]
                      }
                    ]
                  },
                  "releaseNotes": {
                    "type": "string"
                  },
                  "requiredCredentials": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/SkillRequiredCredential"
                    }
                  },
                  "files": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Relative path within the skill folder. No leading slash or '..' segments."
                        },
                        "contentBase64": {
                          "type": "string",
                          "format": "base64",
                          "contentEncoding": "base64",
                          "pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
                          "description": "Base64-encoded file bytes. Per-file decoded size max 10 MB."
                        }
                      },
                      "required": [
                        "path",
                        "contentBase64"
                      ]
                    },
                    "description": "Skill folder as base64-encoded files. A root SKILL.md is required. Total decoded size max 10 MB."
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "git"
                      },
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "HTTPS git repository URL (https:// only). Public repos are cloned directly; private repos use the org's GitHub installation."
                      },
                      "ref": {
                        "description": "Branch, tag, or commit to mirror. Omitted = the remote's default branch (HEAD). Floating refs are re-resolved at index build time.",
                        "type": "string"
                      },
                      "path": {
                        "description": "Subdirectory containing SKILL.md, relative to the repo root. No leading slash or '..' segments.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "url"
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "skill.version.list",
        "summary": "List skill versions",
        "description": "Git-backed skills are versionless (GitHub owns their history) but expose one pointer row holding the git source; its version string is a placeholder, not a commit SHA.",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "List of skill versions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SkillVersion"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/skills/{id}/versions/{version}": {
      "get": {
        "operationId": "skill.version.get",
        "summary": "Get a skill version",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Skill version details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillVersion"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "version",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "required": true
          }
        ]
      }
    },
    "/api/skills/{id}/versions/{version}/data": {
      "get": {
        "operationId": "skill.version.data",
        "summary": "Read skill version data",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "One shape per skill kind: file-backed versions return their files base64-encoded (binary-safe); git-backed versions return the git source pointer verbatim (Read fix #1).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SkillVersionFiles"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "git"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "HTTPS git repository URL (https:// only). Public repos are cloned directly; private repos use the org's GitHub installation."
                        },
                        "ref": {
                          "description": "Branch, tag, or commit to mirror. Omitted = the remote's default branch (HEAD). Floating refs are re-resolved at index build time.",
                          "type": "string"
                        },
                        "path": {
                          "description": "Subdirectory containing SKILL.md, relative to the repo root. No leading slash or '..' segments.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "url"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "version",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "required": true
          }
        ]
      }
    },
    "/api/skills/{id}/versions/{version}/archive": {
      "post": {
        "operationId": "skill.version.archive",
        "summary": "Archive a skill version",
        "tags": [
          "Skills"
        ],
        "responses": {
          "200": {
            "description": "Archived skill version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillVersion"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "version",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "required": true
          }
        ]
      }
    },
    "/api/tasks": {
      "post": {
        "operationId": "task.create",
        "summary": "Create a task",
        "description": "Create an action item. Org-visible by default; `visibility: \"private\"` keeps it to the calling user. Set `projectId` to bind it to a project (its pod is filled in automatically), or `podId` alone for a pod-wide task.",
        "tags": [
          "Tasks"
        ],
        "responses": {
          "200": {
            "description": "Created task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "description": "One-line statement of the action to take. Written for whoever picks the task up next."
                  },
                  "description": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Markdown body: context, acceptance criteria, links to prior discussion. Null when the title says it all."
                  },
                  "status": {
                    "default": "open",
                    "type": "string",
                    "enum": [
                      "open",
                      "in_progress",
                      "done",
                      "dismissed"
                    ],
                    "description": "`open` (not started), `in_progress` (someone or some agent is on it), `done` (completed), `dismissed` (rejected — kept queryable so a suggestion is never re-created)."
                  },
                  "priority": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "low",
                          "medium",
                          "high"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "`low`, `medium` or `high`; null means unprioritized. Same scale agents use for their own todos."
                  },
                  "labels": {
                    "description": "Free-form categories plus native `ren-improve` and `ren-fix` categories. Other `ren-*` labels are reserved. Trimmed, lowercased and deduped on write; at most 16 labels, each 1-64 characters.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "links": {
                    "description": "Bare URLs or `/`-rooted Ren paths the task points at — including a file-store path when the task references a file. Deduped on write; at most 32 links.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "dueAt": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "ISO timestamp the task is due by; null when there is no deadline."
                  },
                  "podId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Pod the task belongs to; null keeps it at org grain. Required whenever `projectId` is set, and must be that project's pod. Only pod members can see or change a pod-scoped task."
                  },
                  "projectId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Project the task belongs to; null keeps it at pod or org grain. Setting it also pins `podId`."
                  },
                  "assignedToUserId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Human owner of the task. Must be a member of the org, and of the pod when the task is pod-scoped."
                  },
                  "assignedToProjectAgentId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Agent that executes the task. Requires `projectId`, and the agent must be attached to that project. May be set alongside `assignedToUserId` — the user owns it, the agent does it."
                  },
                  "visibility": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "private",
                      "org"
                    ]
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "task.list",
        "summary": "List tasks",
        "description": "The actionable set by default: `open` and `in_progress` tasks the caller can see, newest first. Pass `includeDone=true` for the full history, including `dismissed` items — do that before creating a task so a previously rejected suggestion is not resurrected.",
        "tags": [
          "Tasks"
        ],
        "responses": {
          "200": {
            "description": "List of tasks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Task"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "orgId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "pod",
                "org"
              ]
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "in_progress",
                "done",
                "dismissed"
              ]
            },
            "description": "Return only tasks in this status."
          },
          {
            "in": "query",
            "name": "priority",
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high"
              ]
            },
            "description": "Return only tasks at this priority."
          },
          {
            "in": "query",
            "name": "label",
            "schema": {
              "type": "string"
            },
            "description": "Return only tasks carrying this label (compared lowercased)."
          },
          {
            "in": "query",
            "name": "podId",
            "schema": {
              "type": "string"
            },
            "description": "Return only tasks scoped to this pod."
          },
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string"
            },
            "description": "Return only tasks scoped to this project."
          },
          {
            "in": "query",
            "name": "assignedToUserId",
            "schema": {
              "type": "string"
            },
            "description": "Return only tasks owned by this user."
          },
          {
            "in": "query",
            "name": "assignedToProjectAgentId",
            "schema": {
              "type": "string"
            },
            "description": "Return only tasks assigned to this project agent."
          },
          {
            "in": "query",
            "name": "includeDone",
            "schema": {
              "type": "boolean"
            },
            "description": "Include `done` and `dismissed` tasks. Off by default, so a bare list is the actionable set."
          }
        ]
      }
    },
    "/api/tasks/{id}": {
      "get": {
        "operationId": "task.get",
        "summary": "Get a task",
        "description": "Fetch one task by id, with its activity trail embedded by default. The trail says who created the task and records every status change and reassignment along with the actor behind it — read it before editing a task you did not create, so you do not undo somebody else's decision. Pass `includeEvents=false` when you only need the task's current state. Returns 404 when the task is outside the caller's visibility.",
        "tags": [
          "Tasks"
        ],
        "responses": {
          "200": {
            "description": "Task details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^tsk_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "includeEvents",
            "schema": {
              "type": "boolean"
            },
            "description": "Embed the task's activity trail (most recent 50 entries, oldest first). On by default; pass false when you only need the task's current state."
          }
        ]
      },
      "patch": {
        "operationId": "task.update",
        "summary": "Update a task",
        "description": "Partial patch of any mutable field — the single way to change a task. An omitted field is left alone; an explicit `null` clears one, so `assignedToUserId: null` unassigns the human owner and `assignedToProjectAgentId: null` unassigns the agent. Set `status` to `done` when the work is finished, or to `dismissed` to reject a suggestion — a dismissed task stays queryable, so it is not proposed again. The activity log stays precise: a patch touching only `status` records `task.status_changed` and one touching only the assignees records `task.assigned`.",
        "tags": [
          "Tasks"
        ],
        "responses": {
          "200": {
            "description": "Updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^tsk_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "description": "One-line statement of the action to take. Written for whoever picks the task up next."
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Markdown body: context, acceptance criteria, links to prior discussion. Null when the title says it all."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "in_progress",
                      "done",
                      "dismissed"
                    ],
                    "description": "`open` (not started), `in_progress` (someone or some agent is on it), `done` (completed), `dismissed` (rejected — kept queryable so a suggestion is never re-created)."
                  },
                  "priority": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "low",
                          "medium",
                          "high"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "`low`, `medium` or `high`; null means unprioritized. Same scale agents use for their own todos."
                  },
                  "labels": {
                    "description": "Free-form categories plus native `ren-improve` and `ren-fix` categories. Other `ren-*` labels are reserved. Trimmed, lowercased and deduped on write; at most 16 labels, each 1-64 characters.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "links": {
                    "description": "Bare URLs or `/`-rooted Ren paths the task points at — including a file-store path when the task references a file. Deduped on write; at most 32 links.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "dueAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "ISO timestamp the task is due by; null when there is no deadline."
                  },
                  "podId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Pod the task belongs to; null keeps it at org grain. Required whenever `projectId` is set, and must be that project's pod. Only pod members can see or change a pod-scoped task."
                  },
                  "projectId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Project the task belongs to; null keeps it at pod or org grain. Setting it also pins `podId`."
                  },
                  "assignedToUserId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Human owner of the task. Must be a member of the org, and of the pod when the task is pod-scoped."
                  },
                  "assignedToProjectAgentId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Agent that executes the task. Requires `projectId`, and the agent must be attached to that project. May be set alongside `assignedToUserId` — the user owns it, the agent does it."
                  }
                },
                "description": "Partial patch — the only way to change a task. An omitted field is left alone; an explicit `null` clears one, so `assignedToUserId: null` unassigns the human owner and `assignedToProjectAgentId: null` unassigns the agent. Move `status` to `done` when the work is finished, or to `dismissed` to reject a suggestion — a dismissed task stays queryable, so it is not proposed again. Changing `projectId` re-derives `podId`."
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "task.archive",
        "summary": "Archive a task",
        "description": "Soft delete. The task leaves every list; its activity log survives.",
        "tags": [
          "Tasks"
        ],
        "responses": {
          "200": {
            "description": "Archived task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^tsk_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/topology": {
      "get": {
        "operationId": "topology.get",
        "summary": "Get agent-stack topology",
        "tags": [
          "Topology"
        ],
        "responses": {
          "200": {
            "description": "Agent-stack topology",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Topology"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": []
      }
    },
    "/api/topology-shares": {
      "post": {
        "operationId": "topologyShare.create",
        "summary": "Create a topology share",
        "tags": [
          "Topology Shares"
        ],
        "responses": {
          "200": {
            "description": "Created topology share",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TopologyShare"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "topologyShare.list",
        "summary": "List topology shares",
        "tags": [
          "Topology Shares"
        ],
        "responses": {
          "200": {
            "description": "List of topology shares",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TopologyShare"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/topology-shares/{id}/archive": {
      "post": {
        "operationId": "topologyShare.archive",
        "summary": "Archive a topology share",
        "tags": [
          "Topology Shares"
        ],
        "responses": {
          "200": {
            "description": "Archived topology share",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TopologyShare"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^tps_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/projects/{projectId}/cron-triggers": {
      "post": {
        "operationId": "cronTrigger.create",
        "summary": "Create a cron trigger",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Created cron trigger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronTrigger"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectAgentId": {
                    "default": null,
                    "description": "Project agent that runs the trigger; null resolves the project's ren meta agent at fire time.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "inputMessage": {
                    "type": "string",
                    "description": "Prompt delivered to the agent on every fire."
                  },
                  "model": {
                    "default": null,
                    "description": "Model selection this trigger's fires run on; null inherits the agent's model, then the project/pod/org default. Applies to the fired turn only, not to human replies in the session.",
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ModelSelection"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "schedule": {
                    "type": "string",
                    "description": "Cron expression that fires the trigger. Overlapping ticks are skipped (Temporal overlap policy SKIP)."
                  },
                  "timezone": {
                    "default": "UTC",
                    "type": "string",
                    "description": "IANA time zone the schedule is evaluated in. Defaults to \"UTC\"."
                  },
                  "until": {
                    "default": null,
                    "description": "Inclusive end boundary (ISO): the exact `until` tick still fires; ticks after it are skipped.",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isEnabled": {
                    "default": true,
                    "description": "When false the Temporal schedule is paused; changes take effect on the next sync.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "inputMessage",
                  "schedule"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "cronTrigger.list",
        "summary": "List cron triggers in a project",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "List of cron triggers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CronTrigger"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/projects/{projectId}/cron-triggers/{triggerId}": {
      "get": {
        "operationId": "cronTrigger.get",
        "summary": "Get a cron trigger",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Cron trigger details with Temporal runtime state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronTriggerDetail"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "triggerId",
            "schema": {
              "type": "string",
              "pattern": "^ctrg_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "cronTrigger.update",
        "summary": "Update a cron trigger",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Updated cron trigger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronTrigger"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "triggerId",
            "schema": {
              "type": "string",
              "pattern": "^ctrg_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectAgentId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Project agent that runs the trigger; null resolves the project's ren meta agent at fire time."
                  },
                  "inputMessage": {
                    "type": "string",
                    "description": "Prompt delivered to the agent on every fire."
                  },
                  "model": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ModelSelection"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Model selection this trigger's fires run on; null inherits the agent's model, then the project/pod/org default. Applies to the fired turn only, not to human replies in the session."
                  },
                  "schedule": {
                    "type": "string",
                    "description": "Cron expression that fires the trigger. Overlapping ticks are skipped (Temporal overlap policy SKIP)."
                  },
                  "timezone": {
                    "type": "string",
                    "description": "IANA time zone the schedule is evaluated in. Defaults to \"UTC\"."
                  },
                  "until": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Inclusive end boundary (ISO): the exact `until` tick still fires; ticks after it are skipped."
                  },
                  "isEnabled": {
                    "type": "boolean",
                    "description": "When false the Temporal schedule is paused; changes take effect on the next sync."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/cron-triggers/{triggerId}/archive": {
      "post": {
        "operationId": "cronTrigger.archive",
        "summary": "Archive a cron trigger",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Archived cron trigger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronTrigger"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "triggerId",
            "schema": {
              "type": "string",
              "pattern": "^ctrg_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/webhook-triggers": {
      "post": {
        "operationId": "webhookTrigger.create",
        "summary": "Create a webhook trigger",
        "tags": [
          "Webhook Triggers"
        ],
        "responses": {
          "200": {
            "description": "Created webhook trigger (with plaintext secret for generic triggers)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTriggerCreateResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "projectAgentId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "senderUserId": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "linear"
                    ]
                  },
                  "providerInstallId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scopeFilter": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "linearProjectId": {
                            "type": "string"
                          },
                          "linearProjectName": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isEnabled": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "projectId",
                  "senderUserId",
                  "provider",
                  "providerInstallId",
                  "scopeFilter"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "webhookTrigger.list",
        "summary": "List webhook triggers in a project",
        "tags": [
          "Webhook Triggers"
        ],
        "responses": {
          "200": {
            "description": "List of webhook triggers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookTrigger"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/webhook-triggers/{triggerId}": {
      "get": {
        "operationId": "webhookTrigger.get",
        "summary": "Get a webhook trigger",
        "tags": [
          "Webhook Triggers"
        ],
        "responses": {
          "200": {
            "description": "Webhook trigger details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTrigger"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "triggerId",
            "schema": {
              "type": "string",
              "pattern": "^wtrg_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "webhookTrigger.update",
        "summary": "Update a webhook trigger",
        "tags": [
          "Webhook Triggers"
        ],
        "responses": {
          "200": {
            "description": "Updated webhook trigger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTrigger"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "triggerId",
            "schema": {
              "type": "string",
              "pattern": "^wtrg_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectAgentId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "senderUserId": {
                    "type": "string"
                  },
                  "scopeFilter": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "linearProjectId": {
                            "type": "string"
                          },
                          "linearProjectName": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isEnabled": {
                    "type": "boolean"
                  },
                  "projectId": {
                    "type": "string",
                    "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "projectId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/webhook-triggers/{triggerId}/archive": {
      "post": {
        "operationId": "webhookTrigger.archive",
        "summary": "Archive a webhook trigger",
        "tags": [
          "Webhook Triggers"
        ],
        "responses": {
          "200": {
            "description": "Archived webhook trigger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTrigger"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "triggerId",
            "schema": {
              "type": "string",
              "pattern": "^wtrg_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "projectId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/slack/install": {
      "post": {
        "operationId": "slack.install",
        "summary": "Begin a Slack workspace install",
        "tags": [
          "Slack"
        ],
        "responses": {
          "200": {
            "description": "Authorization URL for the user to visit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackOAuthStartResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "returnTo",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "operationId": "slack.uninstall",
        "summary": "Disconnect the caller's org Slack workspace",
        "tags": [
          "Slack"
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/slack/onboarding/resolve": {
      "get": {
        "operationId": "slack.onboarding.resolve",
        "summary": "Resolve the next onboarding step after Sign in with Slack",
        "tags": [
          "Slack"
        ],
        "responses": {
          "200": {
            "description": "Whether the workspace is already installed or needs the bot install flow",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackOnboardingResolveResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "returnTo",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/slack/status": {
      "get": {
        "operationId": "slack.status",
        "summary": "Report whether Slack is installed for the caller's org",
        "tags": [
          "Slack"
        ],
        "responses": {
          "200": {
            "description": "Slack installation status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackStatus"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/slack/channels": {
      "get": {
        "operationId": "slack.channel.list",
        "summary": "List Slack channels with their current project mapping",
        "tags": [
          "Slack"
        ],
        "responses": {
          "200": {
            "description": "Channels visible to the Ren bot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SlackChannel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/slack/channels/{channelId}": {
      "put": {
        "operationId": "slack.channel.set",
        "summary": "Map a Slack channel to a project",
        "tags": [
          "Slack"
        ],
        "responses": {
          "200": {
            "description": "Updated installation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackInstallationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "channelId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "notify",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string"
                  },
                  "fallbackSenderUserId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "projectId",
                  "fallbackSenderUserId"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "slack.channel.unset",
        "summary": "Unset a Slack channel's project mapping",
        "tags": [
          "Slack"
        ],
        "responses": {
          "200": {
            "description": "Updated installation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackInstallationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "channelId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/emails": {
      "get": {
        "operationId": "email.list",
        "summary": "List email mailboxes for the caller's org",
        "tags": [
          "Emails"
        ],
        "responses": {
          "200": {
            "description": "Email mailboxes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectEmailResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/emails/{projectId}": {
      "post": {
        "operationId": "email.set",
        "summary": "Enable the email channel for a project (create or update its mailbox)",
        "tags": [
          "Emails"
        ],
        "responses": {
          "200": {
            "description": "The project's email mailbox",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectEmailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fallbackSenderUserId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "email.unset",
        "summary": "Disable the email channel for a project",
        "tags": [
          "Emails"
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/telegram/link-code": {
      "post": {
        "operationId": "telegram.linkCode",
        "summary": "Mint a deep link to connect a Telegram account to the caller's Ren user",
        "tags": [
          "Telegram"
        ],
        "responses": {
          "200": {
            "description": "Link code",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramLinkCode"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/telegram/me": {
      "get": {
        "operationId": "telegram.me",
        "summary": "Whether the caller's Ren user has a linked Telegram account",
        "tags": [
          "Telegram"
        ],
        "responses": {
          "200": {
            "description": "Link status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramLinkStatus"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/telegram/link": {
      "delete": {
        "operationId": "telegram.unlink",
        "summary": "Disconnect the caller's linked Telegram account",
        "tags": [
          "Telegram"
        ],
        "responses": {
          "204": {
            "description": "Unlinked"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/telegram/chats/claim-code": {
      "post": {
        "operationId": "telegram.claimCode",
        "summary": "Mint a deep link to claim a Telegram chat for a project",
        "tags": [
          "Telegram"
        ],
        "responses": {
          "200": {
            "description": "Claim code",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramClaimCode"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "fallbackSenderUserId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "projectId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/telegram/chats": {
      "get": {
        "operationId": "telegram.chat.list",
        "summary": "List Telegram chats mapped to the caller's org projects",
        "tags": [
          "Telegram"
        ],
        "responses": {
          "200": {
            "description": "Mapped chats",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TelegramChat"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/telegram/chats/{chatId}": {
      "put": {
        "operationId": "telegram.chat.set",
        "summary": "Map a Telegram chat to a project",
        "tags": [
          "Telegram"
        ],
        "responses": {
          "200": {
            "description": "Updated mapping",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramChatMapping"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "chatId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "topicId",
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string"
                  },
                  "fallbackSenderUserId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "allowedSenders": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "blockedSenders": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "projectId"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "telegram.chat.unset",
        "summary": "Unset a Telegram chat's project mapping",
        "tags": [
          "Telegram"
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "chatId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "topicId",
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/linear/install": {
      "post": {
        "operationId": "linear.install",
        "summary": "Begin a Linear workspace install",
        "tags": [
          "Linear"
        ],
        "responses": {
          "200": {
            "description": "Authorization URL for the user to visit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinearOAuthStartResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "returnTo",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "operationId": "linear.uninstall",
        "summary": "Disconnect the caller's org Linear workspace",
        "tags": [
          "Linear"
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/linear/status": {
      "get": {
        "operationId": "linear.status",
        "summary": "Report whether Linear is installed for the caller's org",
        "tags": [
          "Linear"
        ],
        "responses": {
          "200": {
            "description": "Linear installation status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinearStatus"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/linear/projects": {
      "get": {
        "operationId": "linear.projects",
        "summary": "List the connected Linear workspace's projects",
        "tags": [
          "Linear"
        ],
        "responses": {
          "200": {
            "description": "Linear projects (with a __global__ entry for issues without a project)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LinearProject"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/linear/mappings": {
      "get": {
        "operationId": "linear.mappings.list",
        "summary": "List Linear project → Ren project mappings",
        "tags": [
          "Linear"
        ],
        "responses": {
          "200": {
            "description": "Linear project mappings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LinearMapping"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "linear.mappings.create",
        "summary": "Map a Linear project to a Ren project (idempotent upsert)",
        "tags": [
          "Linear"
        ],
        "responses": {
          "200": {
            "description": "Created mapping",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinearMapping"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "renProjectId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "linearProjectId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "senderUserId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "projectAgentId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "renProjectId",
                  "linearProjectId",
                  "senderUserId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/linear/mappings/{triggerId}": {
      "delete": {
        "operationId": "linear.mappings.remove",
        "summary": "Remove a Linear project mapping",
        "tags": [
          "Linear"
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "triggerId",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/vaults": {
      "get": {
        "operationId": "vault.list",
        "summary": "List vaults",
        "tags": [
          "Vaults"
        ],
        "responses": {
          "200": {
            "description": "List of vaults",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vault"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "visibility",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "pod",
                "org"
              ]
            }
          }
        ]
      }
    },
    "/api/vaults/{id}": {
      "get": {
        "operationId": "vault.get",
        "summary": "Get a vault",
        "tags": [
          "Vaults"
        ],
        "responses": {
          "200": {
            "description": "Vault details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultDetail"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^vlt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/vaults/{vaultId}/credentials": {
      "post": {
        "operationId": "credential.create",
        "summary": "Create a credential",
        "tags": [
          "Vaults"
        ],
        "responses": {
          "200": {
            "description": "Created credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credential"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "schema": {
              "type": "string",
              "pattern": "^vlt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCredentialBody"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "credential.list",
        "summary": "List credentials",
        "tags": [
          "Vaults"
        ],
        "responses": {
          "200": {
            "description": "List of credentials",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Credential"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "schema": {
              "type": "string",
              "pattern": "^vlt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/vaults/{vaultId}/credentials/{id}": {
      "get": {
        "operationId": "credential.get",
        "summary": "Get a credential",
        "tags": [
          "Vaults"
        ],
        "responses": {
          "200": {
            "description": "Credential details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credential"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "schema": {
              "type": "string",
              "pattern": "^vlt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^crd_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      },
      "patch": {
        "operationId": "credential.update",
        "summary": "Update a credential (rename or rotate value)",
        "tags": [
          "Vaults"
        ],
        "responses": {
          "200": {
            "description": "Updated credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credential"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "schema": {
              "type": "string",
              "pattern": "^vlt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^crd_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "auth": {
                    "$ref": "#/components/schemas/CredentialAuth"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "credential.delete",
        "summary": "Delete a credential permanently",
        "tags": [
          "Vaults"
        ],
        "responses": {
          "200": {
            "description": "Deleted credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credential"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "schema": {
              "type": "string",
              "pattern": "^vlt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^crd_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/vaults/{vaultId}/credentials/{id}/transfer": {
      "post": {
        "operationId": "credential.transfer",
        "summary": "Copy or move a credential to another vault",
        "tags": [
          "Vaults"
        ],
        "responses": {
          "200": {
            "description": "Credential transferred",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialTransferResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "schema": {
              "type": "string",
              "pattern": "^vlt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^crd_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialTransferInput"
              }
            }
          }
        }
      }
    },
    "/api/vaults/{vaultId}/oauth/connect": {
      "post": {
        "operationId": "credential.oauth.connect",
        "summary": "Start 'Sign in with X' for an MCP in this vault (or confirm it is already connected)",
        "tags": [
          "Vaults"
        ],
        "responses": {
          "200": {
            "description": "OAuth connect result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthConnectResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "vaultId",
            "schema": {
              "type": "string",
              "pattern": "^vlt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthConnectBody"
              }
            }
          }
        }
      }
    },
    "/api/vaults/oauth/sessions/{sessionId}": {
      "get": {
        "operationId": "credential.oauth.session",
        "summary": "Poll a sign-in session's status",
        "tags": [
          "Vaults"
        ],
        "responses": {
          "200": {
            "description": "Session status snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthSessionStatus"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "schema": {
              "type": "string",
              "pattern": "^oas_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/registry/agents": {
      "get": {
        "operationId": "registry.agent.list",
        "summary": "List registry agents",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "List of published agents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Agent"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/registry/agents/{id}": {
      "get": {
        "operationId": "registry.agent.get",
        "summary": "Get a registry agent",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Agent details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^agt_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/registry/skills": {
      "get": {
        "operationId": "registry.skill.list",
        "summary": "List registry skills",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "List of published skills",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Skill"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string",
              "enum": [
                "popular",
                "trending",
                "recent"
              ]
            }
          }
        ]
      }
    },
    "/api/registry/skills/{id}": {
      "get": {
        "operationId": "registry.skill.get",
        "summary": "Get a registry skill",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Skill details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^skl_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/registry/mcps": {
      "get": {
        "operationId": "registry.mcp.list",
        "summary": "List registry MCPs",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "List of published MCPs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MCP"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string",
              "enum": [
                "popular",
                "trending",
                "recent"
              ]
            }
          }
        ]
      }
    },
    "/api/registry/mcps/{id}": {
      "get": {
        "operationId": "registry.mcp.get",
        "summary": "Get a registry MCP",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "MCP details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCP"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true
          }
        ]
      }
    },
    "/api/registry/blueprints": {
      "get": {
        "operationId": "registry.blueprint.list",
        "summary": "List registry blueprints",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Published blueprint list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BlueprintPublicListItem"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "schema": {
              "$ref": "#/components/schemas/BlueprintKind"
            }
          },
          {
            "in": "query",
            "name": "usecase",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "in": "query",
            "name": "role",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "in": "query",
            "name": "function",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "in": "query",
            "name": "vertical",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ]
      }
    },
    "/api/registry/blueprints/{slug}": {
      "get": {
        "operationId": "registry.blueprint.get",
        "summary": "Get a registry blueprint by slug",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Public blueprint view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlueprintPublicView"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-z0-9-]+$"
            },
            "required": true,
            "description": "URL-friendly identifier"
          }
        ]
      }
    },
    "/api/registry/publishers/{slug}": {
      "get": {
        "operationId": "registry.publisher.get",
        "summary": "Get a registry publisher by slug",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Public publisher view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublisherPublicView"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-z0-9-]+$"
            },
            "required": true,
            "description": "URL-friendly identifier"
          }
        ]
      }
    },
    "/api/registry/publishers/{slug}/blueprints": {
      "get": {
        "operationId": "registry.publisher.blueprints",
        "summary": "List a registry publisher's blueprints",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Published blueprint list for the publisher",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BlueprintPublicListItem"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-z0-9-]+$"
            },
            "required": true,
            "description": "URL-friendly identifier"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/registry/publishers/{slug}/skills": {
      "get": {
        "operationId": "registry.publisher.skills",
        "summary": "List a registry publisher's skills",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Published skill list for the publisher",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Skill"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-z0-9-]+$"
            },
            "required": true,
            "description": "URL-friendly identifier"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/registry/publishers/{slug}/agents": {
      "get": {
        "operationId": "registry.publisher.agents",
        "summary": "List a registry publisher's agents",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Published agent list for the publisher",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Agent"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-z0-9-]+$"
            },
            "required": true,
            "description": "URL-friendly identifier"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/registry/publishers/{slug}/mcps": {
      "get": {
        "operationId": "registry.publisher.mcps",
        "summary": "List a registry publisher's MCPs",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Published MCP list for the publisher",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MCP"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-z0-9-]+$"
            },
            "required": true,
            "description": "URL-friendly identifier"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "includeDeprecated",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/api/registry/replays/{slug}": {
      "get": {
        "operationId": "registry.replay.get",
        "summary": "Get a registry replay by slug",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Public replay view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayPublicView"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-z0-9-]+$"
            },
            "required": true,
            "description": "URL-friendly identifier"
          }
        ]
      }
    },
    "/api/registry/replays/{slug}/files/presign-download": {
      "post": {
        "operationId": "registry.replay.files.presignDownload",
        "summary": "Presign a download URL for a public replay's pod-volume file",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Presigned download URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayPresignDownloadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-z0-9-]+$"
            },
            "required": true,
            "description": "URL-friendly identifier"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "outputs",
                      "uploads"
                    ]
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "filename"
                ]
              }
            }
          }
        }
      }
    },
    "/api/registry/replays/share/{token}": {
      "get": {
        "operationId": "registry.replay.shared.get",
        "summary": "Get a shared replay by its share token",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Public replay view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayPublicView"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    },
    "/api/registry/replays/share/{token}/files/presign-download": {
      "post": {
        "operationId": "registry.replay.shared.files.presignDownload",
        "summary": "Presign a download URL for a shared replay's pod-volume file",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Presigned download URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayPresignDownloadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "outputs",
                      "uploads"
                    ]
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "filename"
                ]
              }
            }
          }
        }
      }
    },
    "/api/registry/topology/share/{token}": {
      "get": {
        "operationId": "registry.topology.share.get",
        "summary": "Get a live topology by its share token",
        "tags": [
          "Registry"
        ],
        "responses": {
          "200": {
            "description": "Live topology for the shared org",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Topology"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "code": {
                      "description": "Stable discriminator for errors a client branches on.",
                      "type": "string",
                      "enum": [
                        "mcp_duplicate_url",
                        "insufficient_credits",
                        "inference_key_revoke_pending",
                        "oauth_session_expired",
                        "oauth_session_busy",
                        "oauth_exchange_unreachable",
                        "oauth_session_failed",
                        "codex_device_auth_disabled",
                        "authorization_not_completable"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "pat": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "ren_pat_*",
        "description": "Personal Access Token"
      }
    },
    "schemas": {
      "Activation": {
        "type": "object",
        "properties": {
          "orgId": {
            "type": "string"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "member.invited",
                "slack.channel.connected",
                "client.used",
                "cron_trigger.created",
                "artifact.created"
              ]
            }
          },
          "rewards": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "composer",
                "channel",
                "app",
                "activation.member.invited",
                "activation.client.used",
                "activation.cron_trigger.created",
                "activation.artifact.created"
              ]
            }
          },
          "rewardAmounts": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "enum": [
                "composer",
                "channel",
                "app",
                "activation.member.invited",
                "activation.client.used",
                "activation.cron_trigger.created",
                "activation.artifact.created"
              ]
            },
            "additionalProperties": {
              "type": "number"
            },
            "required": [
              "composer",
              "channel",
              "app",
              "activation.member.invited",
              "activation.client.used",
              "activation.cron_trigger.created",
              "activation.artifact.created"
            ]
          },
          "complete": {
            "type": "boolean"
          },
          "dismissed": {
            "type": "boolean"
          }
        },
        "required": [
          "orgId",
          "steps",
          "rewards",
          "rewardAmounts",
          "complete",
          "dismissed"
        ]
      },
      "WebsiteMetadata": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "longDescription": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "format": "uri"
          },
          "favicon": {
            "type": "string",
            "format": "uri"
          },
          "supportUrl": {
            "type": "string",
            "format": "uri"
          },
          "privacyPolicyUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "PublisherLink": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1
          },
          "href": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "label",
          "href"
        ]
      },
      "PublisherPublicView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "handle": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isVerified": {
            "type": "boolean"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublisherLink"
            }
          }
        },
        "required": [
          "id",
          "slug",
          "handle",
          "name",
          "description",
          "avatar",
          "url",
          "isVerified",
          "links"
        ]
      },
      "ModelSelection": {
        "description": "Model this trigger's fires run on; absent inherits the agent/project default.",
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "minLength": 1
          },
          "variant": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "model"
        ]
      },
      "AgentLatestVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "version": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+$"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "skillId": {
                  "type": "string"
                },
                "skillVersionId": {
                  "default": null,
                  "description": "Pin a specific skill version, or null to track the skill's latest version.",
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "skill": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "icon": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "icon"
                  ]
                }
              },
              "required": [
                "skillId",
                "skill"
              ]
            }
          },
          "mcps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "mcpId": {
                  "type": "string"
                },
                "mcp": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "icon": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "icon"
                  ]
                }
              },
              "required": [
                "mcpId",
                "mcp"
              ]
            }
          }
        },
        "required": [
          "id",
          "agentId",
          "version",
          "description",
          "prompt",
          "model",
          "skills",
          "mcps"
        ]
      },
      "Agent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publisherId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "parentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "websiteMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "latestVersionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecationMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publisher": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublisherPublicView"
              },
              {
                "type": "null"
              }
            ]
          },
          "latestVersion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentLatestVersion"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "icon",
          "orgId",
          "userId",
          "publisherId",
          "parentId",
          "websiteMetadata",
          "latestVersionId",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "deprecatedAt",
          "deprecationMessage"
        ]
      },
      "PermissionConfig": {
        "description": "What this project's tools may do. Maps a tool name or glob to \"allow\", \"ask\" (stop and ask the user first) or \"deny\"; a value may also be a map of glob to action. MCP tools are \"<mcp-slug>_<tool>\", so \"slack_*\" is all of Slack's. Full-replace on update. Example: {\"webfetch\":\"deny\",\"slack_post_message\":\"ask\",\"bash\":{\"*\":\"allow\",\"rm *\":\"deny\"}}",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "__originalKeys": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "read": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny",
                      "ask"
                    ]
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    }
                  }
                ]
              },
              "edit": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny",
                      "ask"
                    ]
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    }
                  }
                ]
              },
              "glob": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny",
                      "ask"
                    ]
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    }
                  }
                ]
              },
              "grep": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny",
                      "ask"
                    ]
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    }
                  }
                ]
              },
              "list": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny",
                      "ask"
                    ]
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    }
                  }
                ]
              },
              "bash": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny",
                      "ask"
                    ]
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    }
                  }
                ]
              },
              "task": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny",
                      "ask"
                    ]
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    }
                  }
                ]
              },
              "external_directory": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny",
                      "ask"
                    ]
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    }
                  }
                ]
              },
              "todowrite": {
                "type": "string",
                "enum": [
                  "allow",
                  "deny",
                  "ask"
                ]
              },
              "question": {
                "type": "string",
                "enum": [
                  "allow",
                  "deny",
                  "ask"
                ]
              },
              "webfetch": {
                "type": "string",
                "enum": [
                  "allow",
                  "deny",
                  "ask"
                ]
              },
              "websearch": {
                "type": "string",
                "enum": [
                  "allow",
                  "deny",
                  "ask"
                ]
              },
              "codesearch": {
                "type": "string",
                "enum": [
                  "allow",
                  "deny",
                  "ask"
                ]
              },
              "lsp": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny",
                      "ask"
                    ]
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    }
                  }
                ]
              },
              "doom_loop": {
                "type": "string",
                "enum": [
                  "allow",
                  "deny",
                  "ask"
                ]
              },
              "skill": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny",
                      "ask"
                    ]
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    }
                  }
                ]
              }
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "ask"
                      ]
                    },
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string",
                        "enum": [
                          "allow",
                          "deny",
                          "ask"
                        ]
                      }
                    }
                  ]
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            }
          },
          {
            "type": "string",
            "enum": [
              "allow",
              "deny",
              "ask"
            ]
          }
        ]
      },
      "AgentArchiveResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publisherId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "parentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "websiteMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "latestVersionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecationMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publisher": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublisherPublicView"
              },
              {
                "type": "null"
              }
            ]
          },
          "latestVersion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentLatestVersion"
              },
              {
                "type": "null"
              }
            ]
          },
          "projectCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Project placements that referenced this agent when it was archived."
          },
          "podCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Distinct pods those placements belong to; each receives a manifest refresh."
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "icon",
          "orgId",
          "userId",
          "publisherId",
          "parentId",
          "websiteMetadata",
          "latestVersionId",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "deprecatedAt",
          "deprecationMessage",
          "projectCount",
          "podCount"
        ]
      },
      "AgentVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "version": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+$"
          },
          "createdById": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "releaseNotes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "permission": {
            "$ref": "#/components/schemas/PermissionConfig"
          },
          "skills": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "skillId": {
                  "type": "string"
                },
                "skillVersionId": {
                  "default": null,
                  "description": "Pin a specific skill version, or null to track the skill's latest version.",
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "skill": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "icon": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "icon"
                  ]
                }
              },
              "required": [
                "skillId",
                "skill"
              ]
            }
          },
          "mcps": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "mcpId": {
                  "type": "string"
                },
                "mcp": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "icon": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "icon"
                  ]
                }
              },
              "required": [
                "mcpId",
                "mcp"
              ]
            }
          }
        },
        "required": [
          "id",
          "agentId",
          "version",
          "createdById",
          "createdAt",
          "archivedAt",
          "description",
          "prompt",
          "model",
          "releaseNotes",
          "permission"
        ]
      },
      "AgentVersionArchiveResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "version": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+$"
          },
          "createdById": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "releaseNotes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "permission": {
            "$ref": "#/components/schemas/PermissionConfig"
          },
          "skills": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "skillId": {
                  "type": "string"
                },
                "skillVersionId": {
                  "default": null,
                  "description": "Pin a specific skill version, or null to track the skill's latest version.",
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "skill": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "icon": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "icon"
                  ]
                }
              },
              "required": [
                "skillId",
                "skill"
              ]
            }
          },
          "mcps": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "mcpId": {
                  "type": "string"
                },
                "mcp": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "icon": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "icon"
                  ]
                }
              },
              "required": [
                "mcpId",
                "mcp"
              ]
            }
          },
          "projectCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Project placements repointed or dropped by archiving this version (pinned + tracking-latest)."
          },
          "podCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Distinct pods those placements belong to; each receives a manifest refresh."
          }
        },
        "required": [
          "id",
          "agentId",
          "version",
          "createdById",
          "createdAt",
          "archivedAt",
          "description",
          "prompt",
          "model",
          "releaseNotes",
          "permission",
          "projectCount",
          "podCount"
        ]
      },
      "BlueprintKind": {
        "type": "string",
        "enum": [
          "org",
          "pod",
          "project",
          "app"
        ]
      },
      "BlueprintCategories": {
        "type": "object",
        "properties": {
          "usecases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "functions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "verticals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SpecMeta": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "SpecOrg": {
        "type": "object",
        "properties": {
          "instructions": {
            "description": "Org-level prose appended to the target org.",
            "type": "string"
          },
          "defaultModel": {
            "$ref": "#/components/schemas/ModelSelection"
          }
        }
      },
      "PresetTemplate": {
        "type": "string",
        "enum": [
          "xs",
          "small",
          "medium",
          "large",
          "xl"
        ]
      },
      "NetworkingConfig": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "unrestricted"
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "limited"
              },
              "allowMcpServers": {
                "type": "boolean"
              },
              "allowPackageManagers": {
                "type": "boolean"
              },
              "allowedHosts": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "type",
              "allowMcpServers",
              "allowPackageManagers",
              "allowedHosts"
            ]
          }
        ]
      },
      "PackagesConfig": {
        "type": "object",
        "properties": {
          "apt": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "npm": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pip": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "go": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TemplateCpuCount": {
        "anyOf": [
          {
            "type": "number",
            "const": 1
          },
          {
            "type": "number",
            "const": 2
          },
          {
            "type": "number",
            "const": 4
          },
          {
            "type": "number",
            "const": 6
          },
          {
            "type": "number",
            "const": 8
          }
        ]
      },
      "TemplateMemoryMB": {
        "anyOf": [
          {
            "type": "number",
            "const": 1024
          },
          {
            "type": "number",
            "const": 2048
          },
          {
            "type": "number",
            "const": 3072
          },
          {
            "type": "number",
            "const": 4096
          },
          {
            "type": "number",
            "const": 5120
          },
          {
            "type": "number",
            "const": 6144
          },
          {
            "type": "number",
            "const": 7168
          },
          {
            "type": "number",
            "const": 8192
          }
        ]
      },
      "SpecEnvironmentDef": {
        "type": "object",
        "properties": {
          "networking": {
            "$ref": "#/components/schemas/NetworkingConfig"
          },
          "packages": {
            "$ref": "#/components/schemas/PackagesConfig"
          },
          "cpuCount": {
            "$ref": "#/components/schemas/TemplateCpuCount"
          },
          "memoryMB": {
            "$ref": "#/components/schemas/TemplateMemoryMB"
          },
          "buildCommands": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          }
        },
        "required": [
          "networking",
          "packages"
        ]
      },
      "SpecEnvironmentEntry": {
        "type": "object",
        "properties": {
          "preset": {
            "$ref": "#/components/schemas/PresetTemplate"
          },
          "def": {
            "$ref": "#/components/schemas/SpecEnvironmentDef"
          }
        }
      },
      "SpecPodEntry": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "instructions": {
            "type": "string"
          },
          "defaultModel": {
            "$ref": "#/components/schemas/ModelSelection"
          },
          "environment": {
            "$ref": "#/components/schemas/SpecEnvironmentEntry"
          }
        },
        "required": [
          "slug",
          "name"
        ]
      },
      "ProjectReference": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "properties": {
              "repository": {
                "type": "string"
              },
              "branch": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "hidden": {
                "type": "boolean"
              }
            },
            "required": [
              "repository"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "path": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "hidden": {
                "type": "boolean"
              }
            },
            "required": [
              "path"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ProjectReferences": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/ProjectReference"
        }
      },
      "SpecProjectDef": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "instructions": {
            "type": "string"
          },
          "references": {
            "$ref": "#/components/schemas/ProjectReferences"
          },
          "skills": {
            "description": "Spec skill slugs attached to this project.",
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9-]*$",
              "description": "Kebab-case key. The only way entries reference each other."
            }
          },
          "mcps": {
            "description": "Spec mcp slugs attached to this project.",
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9-]*$",
              "description": "Kebab-case key. The only way entries reference each other."
            }
          },
          "permission": {
            "$ref": "#/components/schemas/PermissionConfig"
          },
          "defaultModel": {
            "$ref": "#/components/schemas/ModelSelection"
          },
          "buildOrder": {
            "description": "Business priority among otherwise-independent projects.",
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "name"
        ]
      },
      "SpecChannelBinding": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "kind": {
            "type": "string",
            "enum": [
              "slack",
              "linear",
              "github",
              "telegram",
              "email"
            ]
          },
          "purpose": {
            "type": "string",
            "description": "Portable intent — 'bug-report intake', 'PR review repo'."
          }
        },
        "required": [
          "slug",
          "kind",
          "purpose"
        ]
      },
      "SpecProjectEntry": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "pod": {
            "description": "Pod entry this project belongs to; omittable when there is exactly one pod.",
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$"
          },
          "def": {
            "$ref": "#/components/schemas/SpecProjectDef"
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecChannelBinding"
            }
          }
        },
        "required": [
          "slug",
          "def"
        ]
      },
      "SpecRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z]+_[A-Za-z0-9]+$",
            "description": "A live Ren entity id (e.g. skl_…, mcp_…)."
          }
        },
        "required": [
          "id"
        ]
      },
      "SpecSkillEntry": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "ref": {
            "$ref": "#/components/schemas/SpecRef"
          }
        },
        "required": [
          "slug",
          "ref"
        ]
      },
      "SpecMcpEntry": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "ref": {
            "$ref": "#/components/schemas/SpecRef"
          }
        },
        "required": [
          "slug",
          "ref"
        ]
      },
      "SpecCronTriggerEntry": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "project": {
            "description": "Project entry this cron belongs to; omitted on apps, where it is the target.",
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$"
          },
          "schedule": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "until": {
            "description": "Inclusive UTC end.",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "inputMessage": {
            "type": "string"
          },
          "model": {
            "$ref": "#/components/schemas/ModelSelection"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "slug",
          "schedule",
          "inputMessage"
        ]
      },
      "SpecDatabaseEntry": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "pod": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "seedSql": {
            "description": "DDL applied once when the file is first created.",
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name"
        ]
      },
      "SpecArtifactEntry": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "pod": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "seed": {
            "type": "string",
            "format": "uri",
            "description": "Self-contained project tarball; unpacked and built on first hydration."
          }
        },
        "required": [
          "slug",
          "title",
          "seed"
        ]
      },
      "SpecTaskEntry": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "project": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$",
            "description": "Kebab-case key. The only way entries reference each other."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "description": {
            "type": "string"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "labels": {
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "slug",
          "title"
        ]
      },
      "SpecInitialPrompt": {
        "description": "Prompt the client auto-inserts into a new chat post-add.",
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "project": {
            "description": "Spec project slug the chat opens in; default = the first project.",
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$"
          }
        },
        "required": [
          "prompt"
        ]
      },
      "Spec": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 5
          },
          "meta": {
            "$ref": "#/components/schemas/SpecMeta"
          },
          "org": {
            "$ref": "#/components/schemas/SpecOrg"
          },
          "pods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecPodEntry"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecProjectEntry"
            }
          },
          "skills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecSkillEntry"
            }
          },
          "mcps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecMcpEntry"
            }
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecCronTriggerEntry"
            }
          },
          "databases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecDatabaseEntry"
            }
          },
          "artifacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecArtifactEntry"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecTaskEntry"
            }
          },
          "channels": {
            "description": "App kind only — the target project is the one added to.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecChannelBinding"
            }
          },
          "initialPrompt": {
            "$ref": "#/components/schemas/SpecInitialPrompt"
          }
        },
        "required": [
          "schemaVersion",
          "meta",
          "pods",
          "projects",
          "skills",
          "mcps",
          "triggers",
          "databases",
          "artifacts",
          "tasks"
        ]
      },
      "Blueprint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/BlueprintKind"
          },
          "categories": {
            "$ref": "#/components/schemas/BlueprintCategories"
          },
          "brandColor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^#[0-9a-f]{6}$",
                "description": "The vendor's own colour, for painting a ground behind a logo that only reads on one theme."
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publisherId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "template": {
            "$ref": "#/components/schemas/Spec"
          },
          "replays": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "examplePrompts": {
            "maxItems": 6,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Starter prompts the composer offers. Suggestions — unlike `initialPrompt`, nothing sends them."
          },
          "websiteMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecationMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publisher": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublisherPublicView"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "kind",
          "categories",
          "brandColor",
          "icon",
          "name",
          "description",
          "orgId",
          "userId",
          "publisherId",
          "template",
          "replays",
          "examplePrompts",
          "websiteMetadata",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "deprecatedAt",
          "deprecationMessage"
        ]
      },
      "BlueprintAddRequirement": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "credential",
              "channel"
            ]
          },
          "message": {
            "type": "string",
            "description": "Plain-language checklist item the caller must satisfy."
          },
          "project": {
            "description": "Spec project slug this requirement is about (channel bindings).",
            "type": "string"
          },
          "credential": {
            "description": "Env-var name of a required credential.",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "message"
        ]
      },
      "BlueprintAddPodMapping": {
        "type": "object",
        "properties": {
          "blueprintPodSlug": {
            "type": "string"
          },
          "podId": {
            "type": "string",
            "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
          }
        },
        "required": [
          "blueprintPodSlug",
          "podId"
        ]
      },
      "BlueprintAddProjectMapping": {
        "type": "object",
        "properties": {
          "blueprintProjectSlug": {
            "type": "string"
          },
          "projectId": {
            "type": "string",
            "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
          }
        },
        "required": [
          "blueprintProjectSlug",
          "projectId"
        ]
      },
      "BlueprintAddReport": {
        "type": "object",
        "properties": {
          "skills": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mcps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "skill",
                    "mcp",
                    "trigger",
                    "environment",
                    "database",
                    "artifact",
                    "task"
                  ]
                },
                "sourceId": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "sourceId",
                "reason"
              ]
            }
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlueprintAddRequirement"
            }
          },
          "databases": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "pattern": "^pdb_[0-9A-HJKMNP-TV-Z]{26}$"
                },
                "podId": {
                  "type": "string",
                  "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "required": [
                "slug",
                "id",
                "podId"
              ]
            }
          },
          "artifacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "pattern": "^art_[0-9A-HJKMNP-TV-Z]{26}$"
                },
                "podId": {
                  "type": "string",
                  "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "slug",
                "id",
                "podId",
                "url"
              ]
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "pattern": "^tsk_[0-9A-HJKMNP-TV-Z]{26}$"
                },
                "projectId": {
                  "type": "string",
                  "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "required": [
                "slug",
                "id",
                "projectId"
              ]
            }
          },
          "podMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlueprintAddPodMapping"
            }
          },
          "projectMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlueprintAddProjectMapping"
            }
          },
          "initialPrompt": {
            "description": "Prompt the client auto-inserts into a new chat; unresolvable targets are omitted.",
            "type": "object",
            "properties": {
              "prompt": {
                "type": "string"
              },
              "projectId": {
                "type": "string",
                "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
              }
            },
            "required": [
              "prompt"
            ]
          }
        },
        "required": [
          "skills",
          "mcps",
          "skipped",
          "requirements",
          "databases",
          "artifacts",
          "tasks",
          "podMappings",
          "projectMappings"
        ]
      },
      "BlueprintAddPodTarget": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "blueprintPodSlug": {
                "type": "string",
                "minLength": 1
              },
              "mode": {
                "type": "string",
                "const": "create"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              }
            },
            "required": [
              "blueprintPodSlug",
              "mode"
            ]
          },
          {
            "type": "object",
            "properties": {
              "blueprintPodSlug": {
                "type": "string",
                "minLength": 1
              },
              "mode": {
                "type": "string",
                "const": "existing"
              },
              "podId": {
                "type": "string",
                "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
              }
            },
            "required": [
              "blueprintPodSlug",
              "mode",
              "podId"
            ]
          }
        ]
      },
      "BlueprintAddProjectTarget": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "blueprintProjectSlug": {
                "type": "string",
                "minLength": 1
              },
              "mode": {
                "type": "string",
                "const": "create"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              }
            },
            "required": [
              "blueprintProjectSlug",
              "mode"
            ]
          },
          {
            "type": "object",
            "properties": {
              "blueprintProjectSlug": {
                "type": "string",
                "minLength": 1
              },
              "mode": {
                "type": "string",
                "const": "existing"
              },
              "projectId": {
                "type": "string",
                "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
              }
            },
            "required": [
              "blueprintProjectSlug",
              "mode",
              "projectId"
            ]
          }
        ]
      },
      "BlueprintAddInput": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "minLength": 1,
            "description": "Blueprint id or slug."
          },
          "podId": {
            "description": "Project kind: the pod the project lands in.",
            "type": "string",
            "pattern": "^pod_[0-9A-HJKMNP-TV-Z]{26}$"
          },
          "targetProjectId": {
            "description": "App kind: the project the app attaches to.",
            "type": "string",
            "pattern": "^prj_[0-9A-HJKMNP-TV-Z]{26}$"
          },
          "podTargets": {
            "description": "Org/pod kind: one entry per spec pod. Omit to create every pod fresh.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlueprintAddPodTarget"
            }
          },
          "projectTargets": {
            "description": "One entry per spec project. Omit to create every project fresh.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlueprintAddProjectTarget"
            }
          }
        },
        "required": [
          "source"
        ]
      },
      "UsageBreakdownItem": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          },
          "credits": {
            "type": "string"
          },
          "eventCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "source",
          "operation",
          "credits",
          "eventCount"
        ]
      },
      "UsageServedByItem": {
        "type": "object",
        "properties": {
          "servedBy": {
            "type": "string",
            "enum": [
              "customer_sub",
              "ren_sub",
              "paid_api",
              "unattributed"
            ]
          },
          "credits": {
            "type": "string"
          },
          "amountCents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "eventCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "promptTokens": {
            "type": "string"
          },
          "completionTokens": {
            "type": "string"
          }
        },
        "required": [
          "servedBy",
          "credits",
          "amountCents",
          "eventCount",
          "promptTokens",
          "completionTokens"
        ]
      },
      "UsageDailyPoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "credits": {
            "type": "string"
          },
          "eventCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "date",
          "credits",
          "eventCount"
        ]
      },
      "UsageGroup": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "credits": {
            "type": "string"
          },
          "amountCents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "eventCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "key",
          "label",
          "credits",
          "amountCents",
          "eventCount"
        ]
      },
      "Usage": {
        "type": "object",
        "properties": {
          "credits": {
            "type": "string"
          },
          "amountCents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "eventCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "through": {
            "type": "string"
          },
          "breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageBreakdownItem"
            }
          },
          "servedBy": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageServedByItem"
            }
          },
          "daily": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageDailyPoint"
            }
          },
          "groupBy": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "user",
                  "member",
                  "agent",
                  "model",
                  "session",
                  "project",
                  "pod",
                  "source",
                  "servedBy"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageGroup"
            }
          }
        },
        "required": [
          "credits",
          "amountCents",
          "eventCount",
          "from",
          "through",
          "breakdown",
          "servedBy",
          "daily",
          "groupBy",
          "groups"
        ]
      },
      "DashboardSummary": {
        "type": "object",
        "properties": {
          "total_tasks": {
            "type": "number"
          },
          "completed_tasks": {
            "type": "number"
          },
          "error_tasks": {
            "type": "number"
          },
          "active_tasks": {
            "type": "number"
          },
          "waiting_tasks": {
            "type": "number"
          },
          "success_rate": {
            "type": "number"
          },
          "autonomy_score": {
            "type": "number"
          }
        },
        "required": [
          "total_tasks",
          "completed_tasks",
          "error_tasks",
          "active_tasks",
          "waiting_tasks",
          "success_rate",
          "autonomy_score"
        ]
      },
      "DashboardTasksOverTimeUserSegment": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "count": {
            "type": "number"
          }
        },
        "required": [
          "user_id",
          "username",
          "count"
        ]
      },
      "DashboardTasksOverTimeItem": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "completed": {
            "type": "number"
          },
          "error": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "by_user": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardTasksOverTimeUserSegment"
            }
          }
        },
        "required": [
          "date",
          "completed",
          "error",
          "total",
          "by_user"
        ]
      },
      "DashboardByAgentItem": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string"
          },
          "agent_name": {
            "type": "string"
          },
          "task_count": {
            "type": "number"
          },
          "success_rate": {
            "type": "number"
          }
        },
        "required": [
          "agent_id",
          "agent_name",
          "task_count",
          "success_rate"
        ]
      },
      "DashboardByUserItem": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "task_count": {
            "type": "number"
          }
        },
        "required": [
          "user_id",
          "username",
          "task_count"
        ]
      },
      "DashboardResponse": {
        "type": "object",
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/DashboardSummary"
          },
          "tasks_over_time": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardTasksOverTimeItem"
            }
          },
          "by_agent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardByAgentItem"
            }
          },
          "by_user": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardByUserItem"
            }
          },
          "agents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "pods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "users": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "period": {
            "type": "string",
            "enum": [
              "7d",
              "30d",
              "90d"
            ]
          }
        },
        "required": [
          "summary",
          "tasks_over_time",
          "by_agent",
          "by_user",
          "agents",
          "pods",
          "users",
          "period"
        ]
      },
      "Environment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "hostingType": {
            "type": "string",
            "enum": [
              "cloud"
            ]
          },
          "cpuCount": {
            "$ref": "#/components/schemas/TemplateCpuCount"
          },
          "memoryMB": {
            "$ref": "#/components/schemas/TemplateMemoryMB"
          },
          "templateName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currentBuildId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "networking": {
            "$ref": "#/components/schemas/NetworkingConfig"
          },
          "packages": {
            "$ref": "#/components/schemas/PackagesConfig"
          },
          "buildCommands": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "orgId",
          "userId",
          "hostingType",
          "cpuCount",
          "memoryMB",
          "templateName",
          "tag",
          "currentBuildId",
          "networking",
          "packages",
          "buildCommands",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "EnvironmentBuildStatus": {
        "type": "string",
        "enum": [
          "queued",
          "building",
          "ready",
          "error"
        ]
      },
      "EnvironmentBuild": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "environmentId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/EnvironmentBuildStatus"
          },
          "tag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cpuCount": {
            "$ref": "#/components/schemas/TemplateCpuCount"
          },
          "memoryMB": {
            "$ref": "#/components/schemas/TemplateMemoryMB"
          },
          "baseRef": {
            "type": "string"
          },
          "templateId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "buildId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "log": {
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "environmentId",
          "status",
          "tag",
          "cpuCount",
          "memoryMB",
          "baseRef",
          "templateId",
          "buildId",
          "log",
          "error",
          "createdAt",
          "updatedAt"
        ]
      },
      "FileStore": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "mountSlug": {
            "type": "string",
            "description": "Slug segment of the mount path; unique across file and memory stores in the org."
          },
          "isDefault": {
            "type": "boolean"
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "mountPath": {
            "type": "string",
            "description": "Absolute path this store is mounted at inside agent workspaces, e.g. /volumes/notes. Write only small markdown/config files here — lockfiles, databases, and git repos on a volume are unreliable (close-to-upload semantics, no file locks)."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "mountSlug",
          "isDefault",
          "orgId",
          "userId",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "mountPath"
        ],
        "description": "A file store: a named bucket of user artifacts, mounted into agent workspaces at its mountPath."
      },
      "FileStoreFile": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "lastModified": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "contentSha256": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "size"
        ]
      },
      "StorePresignResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "url",
          "expiresAt"
        ]
      },
      "StoreStartUploadResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Presigned PUT URL for the staging area — upload the bytes here"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "uploadId": {
            "type": "string",
            "description": "Pass this to files.finalizeUpload after the PUT succeeds"
          },
          "status": {
            "type": "string",
            "const": "staged",
            "description": "The upload lands in a staging area, invisible to workspaces and file lists. Call files.finalizeUpload with the uploadId to make it a real file; unfinalized uploads are discarded after 24 hours."
          }
        },
        "required": [
          "url",
          "expiresAt",
          "uploadId",
          "status"
        ]
      },
      "GithubOAuthStartResult": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "url"
        ]
      },
      "GithubInstallationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "installedById": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "installationId": {
            "type": "string"
          },
          "accountLogin": {
            "type": "string"
          },
          "accountType": {
            "type": "string",
            "enum": [
              "User",
              "Organization"
            ]
          },
          "repositorySelection": {
            "type": "string",
            "enum": [
              "all",
              "selected"
            ]
          },
          "selectedRepos": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fullName": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "fullName"
                  ]
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "appPermissions": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "repoMappings": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "repoFullName": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "fallbackSenderUserId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "prListenerEnabled": {
                  "type": "boolean"
                },
                "prListenerPrompt": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "repoFullName",
                "projectId",
                "fallbackSenderUserId",
                "prListenerEnabled",
                "prListenerPrompt"
              ]
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "orgId",
          "installedById",
          "installationId",
          "accountLogin",
          "accountType",
          "repositorySelection",
          "selectedRepos",
          "appPermissions",
          "repoMappings",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "GithubStatus": {
        "type": "object",
        "properties": {
          "hasInstallation": {
            "type": "boolean"
          },
          "hasUserCredential": {
            "type": "boolean"
          },
          "installations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GithubInstallationResponse"
            }
          }
        },
        "required": [
          "hasInstallation",
          "hasUserCredential",
          "installations"
        ]
      },
      "GithubRepo": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": "string"
          },
          "accountLogin": {
            "type": "string"
          },
          "repoId": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          }
        },
        "required": [
          "installationId",
          "accountLogin",
          "repoId",
          "fullName"
        ]
      },
      "GithubRepoMapping": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": "string"
          },
          "accountLogin": {
            "type": "string"
          },
          "repoId": {
            "type": "string"
          },
          "repoFullName": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "projectName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fallbackSenderUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "prListenerEnabled": {
            "type": "boolean"
          },
          "prListenerPrompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "installationId",
          "accountLogin",
          "repoId",
          "repoFullName",
          "projectId",
          "projectName",
          "fallbackSenderUserId",
          "prListenerEnabled",
          "prListenerPrompt"
        ]
      },
      "GoogleWorkspaceStatus": {
        "type": "object",
        "properties": {
          "isConfigured": {
            "type": "boolean"
          },
          "clientId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "redirectUri": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "isConfigured",
          "clientId",
          "scopes",
          "redirectUri"
        ]
      },
      "GoogleWorkspaceOAuthStartResult": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "url"
        ]
      },
      "InferenceProvider": {
        "type": "string",
        "enum": [
          "anthropic",
          "openai"
        ]
      },
      "AvailableInferenceService": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "providerId": {
            "$ref": "#/components/schemas/InferenceProvider"
          },
          "authenticationMethods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "authorizationFlow": {
                  "type": "string",
                  "enum": [
                    "redirect-code",
                    "device-code",
                    "access-token"
                  ]
                },
                "refreshable": {
                  "type": "boolean"
                },
                "acceptsNewConnections": {
                  "type": "boolean"
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "authorizationFlow",
                "refreshable",
                "acceptsNewConnections",
                "label"
              ]
            }
          }
        },
        "required": [
          "id",
          "providerId",
          "authenticationMethods"
        ]
      },
      "InferenceConnectionCredentialStatus": {
        "type": "string",
        "enum": [
          "valid",
          "needs_reauth",
          "refresh_uncertain",
          "disabled"
        ]
      },
      "InferenceSubscriptionAvailabilityStatus": {
        "type": "string",
        "enum": [
          "available",
          "exhausted",
          "temporarily_unavailable",
          "blocked",
          "disabled"
        ]
      },
      "InferenceProviderUsage": {
        "type": "object",
        "properties": {
          "windows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "kind": {
                  "default": "entitlement",
                  "type": "string",
                  "enum": [
                    "quota",
                    "entitlement"
                  ]
                },
                "windowMinutes": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "utilization": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resetsAt": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "models": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "family": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "opus",
                        "sonnet",
                        "fable",
                        "haiku"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "label": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "default": "response_header",
                  "type": "string",
                  "enum": [
                    "oauth_endpoint",
                    "response_header"
                  ]
                },
                "observedAt": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "key",
                "utilization",
                "status",
                "resetsAt"
              ]
            }
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "resetsAt": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "representativeWindow": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "overageDisabledReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fallbackPercentage": {
            "default": null,
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "activeLimit": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "planType": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "creditsAvailable": {
            "default": null,
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "creditsUnlimited": {
            "default": null,
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "safetyBufferingFasterModel": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "polledAt": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "observedAt": {
            "type": "string"
          }
        },
        "required": [
          "windows",
          "status",
          "representativeWindow",
          "overageDisabledReason",
          "observedAt"
        ]
      },
      "InferenceConnectionSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "serviceId": {
            "type": "string"
          },
          "providerSubscriptionTier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "providerSubscriptionStatus": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "providerRateLimitTier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "availabilityStatus": {
            "$ref": "#/components/schemas/InferenceSubscriptionAvailabilityStatus"
          },
          "availabilityReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "unavailableUntil": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "supportedModels": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "supportedEfforts": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InferenceProviderUsage"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastSelectedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "serviceId",
          "providerSubscriptionTier",
          "providerSubscriptionStatus",
          "providerRateLimitTier",
          "availabilityStatus",
          "availabilityReason",
          "unavailableUntil",
          "supportedModels",
          "supportedEfforts",
          "usage",
          "lastSelectedAt"
        ]
      },
      "InferenceConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "providerId": {
            "$ref": "#/components/schemas/InferenceProvider"
          },
          "authenticationMethodId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "credentialStatus": {
            "$ref": "#/components/schemas/InferenceConnectionCredentialStatus"
          },
          "credentialStatusReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "credentialExpiresAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "subscriptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InferenceConnectionSubscription"
            }
          },
          "connectedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "providerId",
          "authenticationMethodId",
          "label",
          "credentialStatus",
          "credentialStatusReason",
          "credentialExpiresAt",
          "subscriptions",
          "connectedAt"
        ]
      },
      "InferenceAuthorization": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "serviceId": {
            "type": "string"
          },
          "providerId": {
            "$ref": "#/components/schemas/InferenceProvider"
          },
          "authenticationMethodId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed",
              "failed",
              "expired"
            ]
          },
          "step": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "open-url-and-paste-code"
                      },
                      "authorizeUrl": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "required": [
                      "kind",
                      "authorizeUrl"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "enter-user-code"
                      },
                      "verificationUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "userCode": {
                        "type": "string"
                      },
                      "pollIntervalMs": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "verificationUrl",
                      "userCode",
                      "pollIntervalMs"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "submit-access-token"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "connectionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "failureReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "serviceId",
          "providerId",
          "authenticationMethodId",
          "status",
          "step",
          "expiresAt",
          "connectionId",
          "failureReason"
        ]
      },
      "InferenceBeginAuthorizationInput": {
        "type": "object",
        "properties": {
          "serviceId": {
            "type": "string",
            "minLength": 1
          },
          "authenticationMethodId": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192
          }
        },
        "required": [
          "serviceId",
          "authenticationMethodId"
        ]
      },
      "InferenceCompleteAuthorizationInput": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "code"
        ]
      },
      "InferenceSeatHealth": {
        "type": "string",
        "enum": [
          "connected",
          "exhausted",
          "transient",
          "needs_reauth",
          "blocked",
          "refresh_uncertain",
          "disabled"
        ]
      },
      "InferenceSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/InferenceProvider"
          },
          "label": {
            "type": "string"
          },
          "health": {
            "$ref": "#/components/schemas/InferenceSeatHealth"
          },
          "cooldownUntil": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "subscriptionType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rateLimitTier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "credentialKind": {
            "type": "string"
          },
          "workspaceId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "planType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "supportedModels": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "healthReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "credentialExpiresAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "contributor": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InferenceProviderUsage"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastSelectedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "connectedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider",
          "label",
          "health",
          "cooldownUntil",
          "subscriptionType",
          "rateLimitTier",
          "credentialKind",
          "workspaceId",
          "planType",
          "supportedModels",
          "healthReason",
          "credentialExpiresAt",
          "contributor",
          "usage",
          "lastSelectedAt",
          "connectedAt"
        ]
      },
      "InferenceUsageBudgetEstimate": {
        "type": "object",
        "properties": {
          "unit": {
            "type": "string",
            "const": "normalized_provider_budget"
          },
          "granularityMinutes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "reliableUntil": {
            "type": "string"
          },
          "points": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "capacity": {
                  "type": "number",
                  "minimum": 0
                },
                "knownCapacity": {
                  "type": "number",
                  "minimum": 0
                },
                "remaining": {
                  "type": "number",
                  "minimum": 0
                },
                "remainingRatio": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unknownPlans": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "at": {
                  "type": "string"
                },
                "byProvider": {
                  "type": "object",
                  "propertyNames": {
                    "$ref": "#/components/schemas/InferenceProvider"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "capacity": {
                        "type": "number",
                        "minimum": 0
                      },
                      "knownCapacity": {
                        "type": "number",
                        "minimum": 0
                      },
                      "remaining": {
                        "type": "number",
                        "minimum": 0
                      },
                      "remainingRatio": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "unknownPlans": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "byClass": {
                        "type": "object",
                        "properties": {
                          "5h": {
                            "type": "object",
                            "properties": {
                              "capacity": {
                                "type": "number",
                                "minimum": 0
                              },
                              "knownCapacity": {
                                "type": "number",
                                "minimum": 0
                              },
                              "remaining": {
                                "type": "number",
                                "minimum": 0
                              },
                              "remainingRatio": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "unknownPlans": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "unlimitedCapacity": {
                                "type": "number",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "capacity",
                              "knownCapacity",
                              "remaining",
                              "remainingRatio",
                              "unknownPlans",
                              "unlimitedCapacity"
                            ]
                          },
                          "7d": {
                            "type": "object",
                            "properties": {
                              "capacity": {
                                "type": "number",
                                "minimum": 0
                              },
                              "knownCapacity": {
                                "type": "number",
                                "minimum": 0
                              },
                              "remaining": {
                                "type": "number",
                                "minimum": 0
                              },
                              "remainingRatio": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "unknownPlans": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "unlimitedCapacity": {
                                "type": "number",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "capacity",
                              "knownCapacity",
                              "remaining",
                              "remainingRatio",
                              "unknownPlans",
                              "unlimitedCapacity"
                            ]
                          }
                        },
                        "required": [
                          "5h",
                          "7d"
                        ]
                      },
                      "elasticPlans": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "capacity",
                      "knownCapacity",
                      "remaining",
                      "remainingRatio",
                      "unknownPlans",
                      "byClass",
                      "elasticPlans"
                    ]
                  },
                  "required": [
                    "anthropic",
                    "openai"
                  ]
                }
              },
              "required": [
                "capacity",
                "knownCapacity",
                "remaining",
                "remainingRatio",
                "unknownPlans",
                "at",
                "byProvider"
              ]
            }
          }
        },
        "required": [
          "unit",
          "granularityMinutes",
          "reliableUntil",
          "points"
        ]
      },
      "InferenceCodexModel": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "defaultEffort": {
            "type": "string"
          },
          "efforts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contextWindow": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "maxContextWindow": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "slug",
          "defaultEffort",
          "efforts",
          "contextWindow",
          "maxContextWindow"
        ]
      },
      "InferenceCodexCatalog": {
        "type": "object",
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InferenceCodexModel"
            }
          }
        },
        "required": [
          "models"
        ]
      },
      "InferenceSubscriptionRenameInput": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "label"
        ]
      },
      "InferenceKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoke_pending",
              "revoked"
            ]
          },
          "owner": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "orphaned": {
            "type": "boolean"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "status",
          "owner",
          "orphaned",
          "lastUsedAt",
          "createdAt"
        ]
      },
      "InferenceKeyCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoke_pending",
              "revoked"
            ]
          },
          "owner": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "orphaned": {
            "type": "boolean"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "status",
          "owner",
          "orphaned",
          "lastUsedAt",
          "createdAt",
          "secret"
        ]
      },
      "InferenceKeyCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "name"
        ]
      },
      "OAuthAuthorizeParams": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "pattern": "^[A-Za-z0-9._-]+$"
        },
        "additionalProperties": {
          "type": "string",
          "maxLength": 512
        }
      },
      "OAuthApp": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "configuredById": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clientId": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "discovery": {
            "type": "string",
            "enum": [
              "static",
              "mcp"
            ]
          },
          "authorizationEndpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokenEndpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokenEndpointAuth": {
            "type": "string",
            "enum": [
              "none",
              "client_secret_basic",
              "client_secret_post"
            ]
          },
          "resource": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "authorizeParams": {
            "$ref": "#/components/schemas/OAuthAuthorizeParams"
          },
          "pkce": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "hasClientSecret": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "orgId",
          "configuredById",
          "name",
          "provider",
          "clientId",
          "scopes",
          "discovery",
          "authorizationEndpoint",
          "tokenEndpoint",
          "tokenEndpointAuth",
          "resource",
          "authorizeParams",
          "pkce",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "hasClientSecret"
        ]
      },
      "OAuthAppRedirectUri": {
        "type": "object",
        "properties": {
          "redirectUri": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "redirectUri"
        ]
      },
      "OAuthAppCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "clientId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "clientSecret": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "scopes": {
            "default": [],
            "maxItems": 64,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "tokenEndpointAuth": {
            "default": "none",
            "type": "string",
            "enum": [
              "none",
              "client_secret_basic",
              "client_secret_post"
            ]
          },
          "resource": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ]
          },
          "authorizeParams": {
            "$ref": "#/components/schemas/OAuthAuthorizeParams"
          },
          "pkce": {
            "default": true,
            "type": "boolean"
          },
          "discovery": {
            "default": "mcp",
            "type": "string",
            "enum": [
              "static",
              "mcp"
            ]
          },
          "authorizationEndpoint": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokenEndpoint": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "clientId"
        ]
      },
      "OAuthAppUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "clientId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "clientSecret": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "scopes": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "tokenEndpointAuth": {
            "type": "string",
            "enum": [
              "none",
              "client_secret_basic",
              "client_secret_post"
            ]
          },
          "resource": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ]
          },
          "authorizeParams": {
            "$ref": "#/components/schemas/OAuthAuthorizeParams"
          },
          "pkce": {
            "type": "boolean"
          },
          "discovery": {
            "type": "string",
            "enum": [
              "static",
              "mcp"
            ]
          },
          "authorizationEndpoint": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokenEndpoint": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OAuthAppUsage": {
        "type": "object",
        "properties": {
          "mcpIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "mcpIds"
        ]
      },
      "McpTimeout": {
        "type": "object",
        "properties": {
          "startup": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 600000
          },
          "catalog": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 600000
          },
          "execution": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 600000
          }
        }
      },
      "Repository": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "McpAuthConfig": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "oauth"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "tokenEndpoint": {
                "type": "string"
              },
              "authorizationEndpoint": {
                "type": "string"
              },
              "tokenEndpointAuth": {
                "type": "string",
                "enum": [
                  "none",
                  "client_secret_basic",
                  "client_secret_post"
                ]
              },
              "oauthAppName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "header"
              },
              "headers": {
                "default": [],
                "maxItems": 8,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_`|~]+$"
                    },
                    "template": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    }
                  },
                  "required": [
                    "name",
                    "template"
                  ]
                }
              },
              "queryParams": {
                "default": [],
                "maxItems": 8,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[A-Za-z0-9._~-]+$"
                    },
                    "template": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    }
                  },
                  "required": [
                    "name",
                    "template"
                  ]
                }
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "api_key"
              },
              "headerName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_`|~]+$"
              },
              "queryParam": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9._~-]+$"
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "basic"
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "none"
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "mcp_provider"
              },
              "provider": {
                "type": "string",
                "enum": [
                  "composio"
                ]
              },
              "toolkit": {
                "type": "string"
              },
              "authConfigId": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "provider",
              "toolkit",
              "authConfigId"
            ]
          }
        ]
      },
      "RequirementWhen": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][A-Za-z0-9_]*$"
          },
          "op": {
            "type": "string",
            "enum": [
              "eq",
              "neq"
            ]
          },
          "value": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "name",
          "op",
          "value"
        ]
      },
      "RequiredCredential": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "default": "env",
                "type": "string",
                "const": "env"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Z_][A-Z0-9_]*$"
              },
              "description": {
                "type": "string",
                "maxLength": 512
              }
            },
            "required": [
              "name"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "secret"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[a-z][A-Za-z0-9_]*$"
              },
              "description": {
                "type": "string",
                "maxLength": 512
              }
            },
            "required": [
              "kind",
              "name"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "oauth_app"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "description": {
                "type": "string",
                "maxLength": 512
              }
            },
            "required": [
              "kind",
              "name"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "text"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[a-z][A-Za-z0-9_]*$"
              },
              "description": {
                "type": "string",
                "maxLength": 512
              },
              "message": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "placeholder": {
                "type": "string",
                "maxLength": 256
              },
              "when": {
                "$ref": "#/components/schemas/RequirementWhen"
              }
            },
            "required": [
              "kind",
              "name",
              "message"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "select"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[a-z][A-Za-z0-9_]*$"
              },
              "description": {
                "type": "string",
                "maxLength": 512
              },
              "message": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "options": {
                "minItems": 1,
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 512
                    },
                    "hint": {
                      "type": "string",
                      "maxLength": 256
                    }
                  },
                  "required": [
                    "label",
                    "value"
                  ]
                }
              },
              "when": {
                "$ref": "#/components/schemas/RequirementWhen"
              }
            },
            "required": [
              "kind",
              "name",
              "message",
              "options"
            ]
          }
        ]
      },
      "SetupMedia": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "alt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "poster": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "kind",
          "url",
          "alt"
        ]
      },
      "SetupSource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "verifiedAt": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          }
        },
        "required": [
          "name"
        ]
      },
      "Setup": {
        "type": "object",
        "properties": {
          "url": {
            "description": "Where the credential is actually issued — the button the guide points at.",
            "type": "string",
            "format": "uri"
          },
          "markdown": {
            "type": "string",
            "maxLength": 16384
          },
          "media": {
            "default": [],
            "maxItems": 8,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SetupMedia"
            }
          },
          "source": {
            "$ref": "#/components/schemas/SetupSource"
          },
          "citations": {
            "default": [],
            "maxItems": 12,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      },
      "MCP": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "mcpServerUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "docUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "remote",
              "local"
            ]
          },
          "command": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cwd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "timeout": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/McpTimeout"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "repository": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Repository"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "prompts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "auth": {
            "type": "string",
            "enum": [
              "none",
              "oauth",
              "api_key",
              "basic",
              "mcp_provider"
            ]
          },
          "authConfig": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/McpAuthConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "env": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "requiredCredentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequiredCredential"
            }
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publisherId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "websiteMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "setup": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Setup"
              },
              {
                "type": "null"
              }
            ]
          },
          "sortOrder": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "popularityScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "trendingScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecationMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publisher": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublisherPublicView"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "description",
          "icon",
          "mcpServerUrl",
          "docUrl",
          "type",
          "command",
          "args",
          "cwd",
          "timeout",
          "version",
          "repository",
          "tools",
          "prompts",
          "auth",
          "authConfig",
          "env",
          "requiredCredentials",
          "orgId",
          "userId",
          "publisherId",
          "websiteMetadata",
          "setup",
          "sortOrder",
          "popularityScore",
          "trendingScore",
          "rank",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "deprecatedAt",
          "deprecationMessage"
        ]
      },
      "SearchResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "user",
              "org",
              "registry"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "description",
          "icon",
          "source",
          "updatedAt"
        ]
      },
      "MemberPersona": {
        "type": "string",
        "enum": [
          "engineering",
          "product",
          "sales",
          "marketing",
          "support",
          "general"
        ]
      },
      "Me": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              }
            },
            "required": [
              "id",
              "name",
              "email"
            ]
          },
          "organization": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "slug"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "persona": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemberPersona"
              },
              {
                "type": "null"
              }
            ]
          },
          "onboarding": {
            "type": "object",
            "properties": {
              "organization": {
                "type": "boolean"
              },
              "member": {
                "type": "boolean"
              }
            },
            "required": [
              "organization",
              "member"
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "session",
              "pat",
              "sandbox"
            ]
          }
        },
        "required": [
          "user",
          "organization",
          "role",
          "persona",
          "onboarding",
          "method"
        ]
      },
      "MemberPersonaUpdate": {
        "type": "object",
        "properties": {
          "persona": {
            "$ref": "#/components/schemas/MemberPersona"
          }
        },
        "required": [
          "persona"
        ]
      },
      "OnboardingComplete": {
        "type": "object",
        "properties": {
          "onboarding": {
            "type": "object",
            "properties": {
              "organization": {
                "type": "boolean"
              },
              "member": {
                "type": "boolean"
              }
            },
            "required": [
              "organization",
              "member"
            ]
          }
        },
        "required": [
          "onboarding"
        ]
      },
      "MemoryStore": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "mountSlug": {
            "type": "string",
            "description": "Slug segment of the mount path; unique across file and memory stores in the org."
          },
          "isDefault": {
            "type": "boolean"
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "mountPath": {
            "type": "string",
            "description": "Absolute path this store is mounted at inside agent workspaces, e.g. /volumes/notes. Write only small markdown/config files here — lockfiles, databases, and git repos on a volume are unreliable (close-to-upload semantics, no file locks)."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "mountSlug",
          "isDefault",
          "orgId",
          "userId",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "mountPath"
        ],
        "description": "A memory store: a named bucket of agent knowledge that persists between sessions, mounted at its mountPath."
      },
      "MemoryStoreFile": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "lastModified": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "contentSha256": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "size"
        ]
      },
      "ModelPricing": {
        "type": "object",
        "properties": {
          "input_usd_per_million_tokens": {
            "type": "number"
          },
          "output_usd_per_million_tokens": {
            "type": "number"
          }
        },
        "required": [
          "input_usd_per_million_tokens",
          "output_usd_per_million_tokens"
        ]
      },
      "ModelEntry": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "modelID": {
            "type": "string"
          },
          "size": {
            "type": "string",
            "enum": [
              "large",
              "medium",
              "small"
            ]
          },
          "pricing": {
            "$ref": "#/components/schemas/ModelPricing"
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "defaultVariant": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "name",
          "description",
          "modelID",
          "variants"
        ]
      },
      "ModelProvider": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelEntry"
            }
          }
        },
        "required": [
          "key",
          "name",
          "models"
        ]
      },
      "ModelsResponse": {
        "type": "object",
        "properties": {
          "default_model": {
            "$ref": "#/components/schemas/ModelSelection"
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelProvider"
            }
          }
        },
        "required": [
          "default_model",
          "providers"
        ]
      },
      "OnboardingReward": {
        "type": "object",
        "properties": {
          "granted": {
            "type": "boolean"
          },
          "amount": {
            "type": "number"
          }
        },
        "required": [
          "granted",
          "amount"
        ]
      },
      "OnboardingStart": {
        "type": "object",
        "properties": {
          "podId": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "jobId": {
            "type": "string"
          },
          "initialPrompt": {
            "type": "string"
          }
        },
        "required": [
          "podId",
          "projectId",
          "jobId",
          "initialPrompt"
        ]
      },
      "OnboardingSetupPersonalOrg": {
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string"
          },
          "alreadyExisted": {
            "type": "boolean"
          }
        },
        "required": [
          "organizationId",
          "alreadyExisted"
        ]
      },
      "OrgSettings": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "defaultModel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "defaultModel",
          "instructions"
        ]
      },
      "OrganizationLogoUpload": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "url"
        ]
      },
      "Pat": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tokenPrefix": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "readonly",
              "member",
              "admin"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "userId",
          "organizationId",
          "name",
          "tokenPrefix",
          "role",
          "scopes",
          "lastUsedAt",
          "expiresAt",
          "revokedAt",
          "createdAt",
          "updatedAt"
        ]
      },
      "Pod": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isPrivate": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "defaultModel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "type": "string"
          },
          "environmentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "presetTemplate": {
            "$ref": "#/components/schemas/PresetTemplate"
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "manifestUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "icon",
          "slug",
          "description",
          "isPrivate",
          "isDefault",
          "defaultModel",
          "instructions",
          "environmentId",
          "presetTemplate",
          "orgId",
          "userId",
          "manifestUpdatedAt",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "Sandbox": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "providerId": {
            "type": "string"
          },
          "providerSandboxId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "templateRef": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "buildId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "internalHost": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publicHost": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "orgId",
          "userId",
          "providerId",
          "providerSandboxId",
          "templateRef",
          "buildId",
          "internalHost",
          "publicHost",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "PodWithSandbox": {
        "type": "object",
        "properties": {
          "pod": {
            "$ref": "#/components/schemas/Pod"
          },
          "sandbox": {
            "$ref": "#/components/schemas/Sandbox"
          }
        },
        "required": [
          "pod",
          "sandbox"
        ]
      },
      "PodMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "podId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "member"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "podId",
          "userId",
          "role",
          "createdAt",
          "updatedAt"
        ]
      },
      "PodResolvedCredential": {
        "type": "object",
        "properties": {
          "credentialId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "vaultId": {
            "type": "string"
          },
          "vaultName": {
            "type": "string"
          },
          "tier": {
            "type": "string",
            "enum": [
              "org",
              "pod",
              "user"
            ]
          },
          "sourcePodId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "anchor": {
            "type": "string"
          },
          "keyPreview": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "shadowed": {
            "type": "boolean"
          }
        },
        "required": [
          "credentialId",
          "name",
          "vaultId",
          "vaultName",
          "tier",
          "sourcePodId",
          "anchor",
          "keyPreview",
          "shadowed"
        ]
      },
      "PodCredentials": {
        "type": "object",
        "properties": {
          "writeVaultId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "credentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PodResolvedCredential"
            }
          }
        },
        "required": [
          "writeVaultId",
          "credentials"
        ]
      },
      "AuthRequirementMcp": {
        "type": "object",
        "properties": {
          "mcpId": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "authType": {
            "type": "string",
            "enum": [
              "none",
              "oauth",
              "api_key",
              "basic",
              "mcp_provider"
            ]
          },
          "authConfig": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/McpAuthConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "satisfied": {
            "type": "boolean"
          },
          "neededByAgentIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "setup": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Setup"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "mcpId",
          "slug",
          "name",
          "icon",
          "authType",
          "authConfig",
          "satisfied",
          "neededByAgentIds",
          "setup"
        ]
      },
      "AuthRequirementEnvSource": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "skill",
              "mcp"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id",
          "name"
        ]
      },
      "AuthRequirementEnv": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "default": "env",
                "type": "string",
                "const": "env"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Z_][A-Z0-9_]*$"
              },
              "description": {
                "type": "string",
                "maxLength": 512
              },
              "satisfied": {
                "type": "boolean"
              },
              "neededBy": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AuthRequirementEnvSource"
                }
              },
              "setup": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Setup"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "name",
              "satisfied",
              "neededBy",
              "setup"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "secret"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[a-z][A-Za-z0-9_]*$"
              },
              "description": {
                "type": "string",
                "maxLength": 512
              },
              "satisfied": {
                "type": "boolean"
              },
              "neededBy": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AuthRequirementEnvSource"
                }
              },
              "setup": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Setup"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "kind",
              "name",
              "satisfied",
              "neededBy",
              "setup"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "oauth_app"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "description": {
                "type": "string",
                "maxLength": 512
              },
              "satisfied": {
                "type": "boolean"
              },
              "neededBy": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AuthRequirementEnvSource"
                }
              },
              "setup": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Setup"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "kind",
              "name",
              "satisfied",
              "neededBy",
              "setup"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "text"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[a-z][A-Za-z0-9_]*$"
              },
              "description": {
                "type": "string",
                "maxLength": 512
              },
              "message": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "placeholder": {
                "type": "string",
                "maxLength": 256
              },
              "when": {
                "$ref": "#/components/schemas/RequirementWhen"
              },
              "satisfied": {
                "type": "boolean"
              },
              "neededBy": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AuthRequirementEnvSource"
                }
              },
              "setup": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Setup"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "kind",
              "name",
              "message",
              "satisfied",
              "neededBy",
              "setup"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "select"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[a-z][A-Za-z0-9_]*$"
              },
              "description": {
                "type": "string",
                "maxLength": 512
              },
              "message": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "options": {
                "minItems": 1,
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 512
                    },
                    "hint": {
                      "type": "string",
                      "maxLength": 256
                    }
                  },
                  "required": [
                    "label",
                    "value"
                  ]
                }
              },
              "when": {
                "$ref": "#/components/schemas/RequirementWhen"
              },
              "satisfied": {
                "type": "boolean"
              },
              "neededBy": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AuthRequirementEnvSource"
                }
              },
              "setup": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Setup"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "kind",
              "name",
              "message",
              "options",
              "satisfied",
              "neededBy",
              "setup"
            ]
          }
        ]
      },
      "AuthRequirements": {
        "type": "object",
        "properties": {
          "mcps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuthRequirementMcp"
            }
          },
          "envs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuthRequirementEnv"
            }
          }
        },
        "required": [
          "mcps",
          "envs"
        ]
      },
      "PodSandboxProvisionResponse": {
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "const": "provisioning"
          }
        },
        "required": [
          "workflowId",
          "status"
        ]
      },
      "PodSandboxTeardownResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "destroyed",
              "absent"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "PodSandboxStatusResponse": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "provisioning"
              },
              "workflowId": {
                "type": "string"
              },
              "phase": {
                "type": "string",
                "enum": [
                  "loading",
                  "resuming",
                  "provisioning",
                  "bootstrapping",
                  "finalizing"
                ]
              }
            },
            "required": [
              "status",
              "workflowId",
              "phase"
            ]
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "ready"
              },
              "sandbox": {
                "$ref": "#/components/schemas/Sandbox"
              },
              "serverPassword": {
                "type": "string"
              }
            },
            "required": [
              "status",
              "sandbox",
              "serverPassword"
            ]
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "absent"
              }
            },
            "required": [
              "status"
            ]
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "failed"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "status",
              "reason"
            ]
          }
        ]
      },
      "PodDatabase": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "podId": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "seedSql": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "podId",
          "orgId",
          "userId",
          "slug",
          "name",
          "description",
          "seedSql",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "Artifact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "podId": {
            "type": "string"
          },
          "sourceSessionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "seedUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "shareToken": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Public URL of the artifact's entrypoint. Possession of the URL grants read access."
          }
        },
        "required": [
          "id",
          "orgId",
          "podId",
          "sourceSessionId",
          "slug",
          "title",
          "description",
          "seedUrl",
          "shareToken",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "url"
        ],
        "description": "An artifact: a static site an agent built in its pod, hosted at a URL."
      },
      "ProjectGitRepo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "minLength": 1
          },
          "baseBranch": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "hidden": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "url"
        ]
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "podId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "slug": {
            "type": "string"
          },
          "defaultModel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "type": "string"
          },
          "permission": {
            "$ref": "#/components/schemas/PermissionConfig"
          },
          "gitRepos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectGitRepo"
            }
          },
          "references": {
            "$ref": "#/components/schemas/ProjectReferences"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "orgId",
          "userId",
          "podId",
          "name",
          "icon",
          "description",
          "slug",
          "defaultModel",
          "instructions",
          "permission",
          "gitRepos",
          "references",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "ProjectAgent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "agentVersionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "subagent",
              "all"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "projectId",
          "agentId",
          "agentVersionId",
          "mode",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProjectFileStore": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "fileStoreId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "projectId",
          "fileStoreId",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProjectMemoryStore": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "memoryStoreId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "projectId",
          "memoryStoreId",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProjectSkill": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "skillId": {
            "type": "string"
          },
          "skillVersionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "projectId",
          "skillId",
          "skillVersionId",
          "createdAt",
          "updatedAt"
        ]
      },
      "SkillPinConflict": {
        "type": "object",
        "properties": {
          "skillSlug": {
            "type": "string",
            "description": "Slug of the skill whose pin lost."
          },
          "pinnedVersion": {
            "type": "string",
            "description": "The bound (pinned) version that did not win."
          },
          "effectiveVersion": {
            "type": "string",
            "description": "The version actually served for this skill in this project."
          },
          "reason": {
            "type": "string",
            "enum": [
              "outranked",
              "pin-archived"
            ],
            "description": "`outranked`: a higher live version won. `pin-archived`: the pin was archived; latest served."
          }
        },
        "required": [
          "skillSlug",
          "pinnedVersion",
          "effectiveVersion",
          "reason"
        ]
      },
      "ProjectSkillResolution": {
        "type": "object",
        "properties": {
          "skills": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "skillId": {
                  "type": "string"
                },
                "skillSlug": {
                  "type": "string"
                },
                "effectiveVersionId": {
                  "type": "string",
                  "description": "The one version served for this skill in this project."
                },
                "effectiveVersion": {
                  "type": "string",
                  "description": "Its version string: semver for file-backed skills; for git-backed skills this is the pointer row's placeholder version — the mirror commit SHA appears in the serving menu, not here."
                }
              },
              "required": [
                "skillId",
                "skillSlug",
                "effectiveVersionId",
                "effectiveVersion"
              ]
            },
            "description": "One resolved version per attached skill (highest live version wins)."
          },
          "conflicts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillPinConflict"
            },
            "description": "Warnings where a bound pin lost. Warning-only: a pin can lose later when a newer version is published."
          }
        },
        "required": [
          "skills",
          "conflicts"
        ]
      },
      "ProjectMcp": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "mcpId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "projectId",
          "mcpId",
          "createdAt",
          "updatedAt"
        ]
      },
      "Publisher": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "organizationId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isVerified": {
            "type": "boolean"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublisherLink"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "organizationId",
          "slug",
          "name",
          "description",
          "avatar",
          "url",
          "isVerified",
          "links",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "PublisherMe": {
        "type": "object",
        "properties": {
          "org": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Publisher"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "org"
        ]
      },
      "Replay": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sessionId": {
            "type": "string"
          },
          "publisherId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "slug": {
            "type": "string"
          },
          "shareToken": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "websiteMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecationMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "orgId",
          "userId",
          "sessionId",
          "publisherId",
          "slug",
          "shareToken",
          "websiteMetadata",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "deprecatedAt",
          "deprecationMessage"
        ]
      },
      "ResourceIconUpload": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "url"
        ]
      },
      "SessionCreateJob": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "pattern": "^sjob_[0-9A-HJKMNP-TV-Z]{26}$"
          },
          "status": {
            "type": "string",
            "const": "pending"
          }
        },
        "required": [
          "jobId",
          "status"
        ]
      },
      "SessionCreateStatus": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "podId": {
                "type": "string"
              },
              "projectId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "const": "pending"
              },
              "phase": {
                "type": "string",
                "enum": [
                  "waiting-sandbox",
                  "creating-session",
                  "loading",
                  "resuming",
                  "provisioning",
                  "bootstrapping",
                  "finalizing"
                ]
              }
            },
            "required": [
              "podId",
              "projectId",
              "status",
              "phase"
            ]
          },
          {
            "type": "object",
            "properties": {
              "podId": {
                "type": "string"
              },
              "projectId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "const": "ready"
              },
              "sessionId": {
                "type": "string"
              }
            },
            "required": [
              "podId",
              "projectId",
              "status",
              "sessionId"
            ]
          },
          {
            "type": "object",
            "properties": {
              "podId": {
                "type": "string"
              },
              "projectId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "const": "failed"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "podId",
              "projectId",
              "status",
              "reason"
            ]
          }
        ]
      },
      "SessionSource": {
        "type": "string",
        "enum": [
          "app",
          "cron",
          "webhook",
          "task",
          "slack",
          "telegram",
          "email",
          "github",
          "linear"
        ]
      },
      "OpencodeSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdById": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "podId": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "workspaceId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "directory": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "shareUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "parentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "summaryAdditions": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -2147483648,
                "maximum": 2147483647
              },
              {
                "type": "null"
              }
            ]
          },
          "summaryDeletions": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -2147483648,
                "maximum": 2147483647
              },
              {
                "type": "null"
              }
            ]
          },
          "summaryFiles": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -2147483648,
                "maximum": 2147483647
              },
              {
                "type": "null"
              }
            ]
          },
          "summaryDiffs": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "string"
                    },
                    "additions": {
                      "type": "number"
                    },
                    "deletions": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "path",
                    "additions",
                    "deletions"
                  ]
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "revert": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "messageId": {
                    "type": "string"
                  },
                  "partId": {
                    "type": "string"
                  },
                  "snapshot": {
                    "type": "string"
                  },
                  "diff": {
                    "type": "string"
                  }
                },
                "required": [
                  "messageId"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "permission": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "idle",
              "busy",
              "waiting",
              "error"
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "details": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "currentAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "$ref": "#/components/schemas/SessionSource"
          },
          "sourceId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "compactingAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "createdById",
          "projectId",
          "podId",
          "slug",
          "workspaceId",
          "directory",
          "title",
          "version",
          "shareUrl",
          "parentId",
          "summaryAdditions",
          "summaryDeletions",
          "summaryFiles",
          "summaryDiffs",
          "revert",
          "permission",
          "status",
          "error",
          "currentAgentId",
          "source",
          "sourceId",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "compactingAt"
        ]
      },
      "SessionSourceLink": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "enum": [
                  "slack",
                  "github",
                  "linear"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "provider",
              "url"
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "SessionUrlResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "authedUrl": {
            "type": "string"
          },
          "serverUrl": {
            "type": "string"
          },
          "serverPassword": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "authedUrl",
          "serverUrl",
          "serverPassword",
          "username"
        ]
      },
      "ReplayMessage": {
        "type": "object",
        "properties": {
          "info": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "parts": {
            "type": "array",
            "items": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          }
        },
        "required": [
          "info",
          "parts"
        ]
      },
      "SessionMessagesPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReplayMessage"
            }
          },
          "pageNumber": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "pageSize": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "items",
          "pageNumber",
          "pageSize",
          "total"
        ]
      },
      "SessionTracesResponse": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "traces": {
            "type": "array",
            "items": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          }
        },
        "required": [
          "configured",
          "traces"
        ]
      },
      "SessionFilesPresignUploadResponse": {
        "type": "object",
        "properties": {
          "uploadUrl": {
            "type": "string"
          },
          "sandboxPath": {
            "type": "string"
          },
          "podVolume": {
            "type": "object",
            "properties": {
              "projectSlug": {
                "type": "string"
              },
              "sessionId": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "outputs",
                  "uploads"
                ]
              },
              "filename": {
                "type": "string"
              }
            },
            "required": [
              "projectSlug",
              "sessionId",
              "kind",
              "filename"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "uploadUrl",
          "sandboxPath",
          "podVolume",
          "expiresAt"
        ]
      },
      "SessionFilesPresignDownloadResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "url",
          "expiresAt"
        ]
      },
      "SessionVolumeRef": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "outputs",
              "uploads"
            ]
          },
          "filename": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "kind",
          "filename"
        ]
      },
      "Skill": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "docUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "repository": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Repository"
              },
              {
                "type": "null"
              }
            ]
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publisherId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "parentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "websiteMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "setup": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Setup"
              },
              {
                "type": "null"
              }
            ]
          },
          "sortOrder": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "popularityScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "trendingScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "latestVersionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecationMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publisher": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublisherPublicView"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "description",
          "icon",
          "docUrl",
          "repository",
          "orgId",
          "userId",
          "publisherId",
          "parentId",
          "websiteMetadata",
          "setup",
          "sortOrder",
          "popularityScore",
          "trendingScore",
          "rank",
          "latestVersionId",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "deprecatedAt",
          "deprecationMessage"
        ]
      },
      "SkillRequiredCredential": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "default": "env",
                "type": "string",
                "const": "env"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Z_][A-Z0-9_]*$"
              },
              "description": {
                "type": "string",
                "maxLength": 512
              }
            },
            "required": [
              "name"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "oauth_app"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "description": {
                "type": "string",
                "maxLength": 512
              }
            },
            "required": [
              "kind",
              "name"
            ]
          }
        ]
      },
      "SkillArchiveResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "docUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "repository": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Repository"
              },
              {
                "type": "null"
              }
            ]
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publisherId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "parentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "websiteMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "setup": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Setup"
              },
              {
                "type": "null"
              }
            ]
          },
          "sortOrder": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "popularityScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "trendingScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "latestVersionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deprecationMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publisher": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublisherPublicView"
              },
              {
                "type": "null"
              }
            ]
          },
          "agentCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "projectCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "description",
          "icon",
          "docUrl",
          "repository",
          "orgId",
          "userId",
          "publisherId",
          "parentId",
          "websiteMetadata",
          "setup",
          "sortOrder",
          "popularityScore",
          "trendingScore",
          "rank",
          "latestVersionId",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "deprecatedAt",
          "deprecationMessage",
          "agentCount",
          "projectCount"
        ]
      },
      "SkillVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "skillId": {
            "type": "string"
          },
          "version": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+$"
          },
          "createdById": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "s3"
                  },
                  "key": {
                    "type": "string",
                    "description": "S3 object-key prefix holding the version's files, one object per file at `${key}/${path}`. The prefix is stored (not a full URL) so a storage-endpoint change never breaks a stored skill; presigned URLs are built at read time (decision 12, Materialise fix #5)."
                  }
                },
                "required": [
                  "type",
                  "key"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "git"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "HTTPS git repository URL (https:// only). Public repos are cloned directly; private repos use the org's GitHub installation."
                  },
                  "ref": {
                    "description": "Branch, tag, or commit to mirror. Omitted = the remote's default branch (HEAD). Floating refs are re-resolved at index build time.",
                    "type": "string"
                  },
                  "path": {
                    "description": "Subdirectory containing SKILL.md, relative to the repo root. No leading slash or '..' segments.",
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "url"
                ]
              }
            ]
          },
          "requiredCredentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillRequiredCredential"
            }
          },
          "releaseNotes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "skillId",
          "version",
          "createdById",
          "createdAt",
          "archivedAt",
          "source",
          "requiredCredentials",
          "releaseNotes"
        ]
      },
      "SkillVersionFiles": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "files",
            "description": "Discriminant: this version is file-backed and returns its files inline."
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Relative path within the skill folder."
                },
                "contentBase64": {
                  "type": "string",
                  "description": "Base64-encoded file bytes. Decode to reconstruct the exact file."
                }
              },
              "required": [
                "path",
                "contentBase64"
              ]
            }
          }
        },
        "required": [
          "type",
          "files"
        ]
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "podId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "done",
              "dismissed"
            ]
          },
          "priority": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dueAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "assignedToUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "assignedToProjectAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdByUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdByProjectAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "orgId",
          "userId",
          "podId",
          "projectId",
          "title",
          "description",
          "status",
          "priority",
          "labels",
          "links",
          "dueAt",
          "assignedToUserId",
          "assignedToProjectAgentId",
          "createdByUserId",
          "createdByProjectAgentId",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ],
        "description": "An action item in Ren, created and maintained by people or by agents."
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "actorUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "actorProjectAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "orgId",
          "entityType",
          "entityId",
          "type",
          "data",
          "actorUserId",
          "actorProjectAgentId",
          "createdAt"
        ],
        "description": "One immutable entry in the product-wide activity log."
      },
      "TaskDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "podId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "done",
              "dismissed"
            ]
          },
          "priority": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dueAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "assignedToUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "assignedToProjectAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdByUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdByProjectAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "events": {
            "description": "The task's activity trail, oldest first — the most recent 50 entries. Says who created the task and records every status change and reassignment with its actor. Omitted when the request passes `includeEvents=false`.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          }
        },
        "required": [
          "id",
          "orgId",
          "userId",
          "podId",
          "projectId",
          "title",
          "description",
          "status",
          "priority",
          "labels",
          "links",
          "dueAt",
          "assignedToUserId",
          "assignedToProjectAgentId",
          "createdByUserId",
          "createdByProjectAgentId",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ],
        "description": "A task with its activity trail embedded."
      },
      "Topology": {
        "type": "object",
        "properties": {
          "meta": {
            "type": "object",
            "properties": {
              "org": {
                "type": "string",
                "description": "Org display name."
              }
            },
            "required": [
              "org"
            ]
          },
          "agents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                  "description": "A live Ren entity id (e.g. pod_…, prj_…, agt_…). Pins the spec entry to an existing row."
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                },
                "name": {
                  "type": "string"
                },
                "model": {
                  "$ref": "#/components/schemas/ModelSelection"
                },
                "icon": {
                  "description": "Logo URL, for rendering.",
                  "type": "string"
                },
                "skills": {
                  "description": "Skill slugs attached to this agent.",
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]*$",
                    "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                  }
                },
                "mcps": {
                  "description": "MCP slugs wired to this agent.",
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]*$",
                    "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                  }
                }
              },
              "required": [
                "id",
                "slug",
                "name"
              ]
            }
          },
          "mcps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                  "description": "A live Ren entity id (e.g. pod_…, prj_…, agt_…). Pins the spec entry to an existing row."
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                },
                "name": {
                  "type": "string"
                },
                "credential": {
                  "description": "Slug of the credential this MCP needs.",
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$"
                },
                "icon": {
                  "description": "Logo URL, for rendering.",
                  "type": "string"
                },
                "tags": {
                  "description": "Tag names, for rendering / filtering.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "id",
                "slug",
                "name"
              ]
            }
          },
          "credentials": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                  "description": "A live Ren entity id (e.g. pod_…, prj_…, agt_…). Pins the spec entry to an existing row."
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                },
                "provider": {
                  "type": "string",
                  "description": "What the credential is for, e.g. \"github\", \"apollo\"."
                },
                "vault": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Slug of the vault this credential lives in."
                }
              },
              "required": [
                "id",
                "slug",
                "provider",
                "vault"
              ]
            }
          },
          "vaults": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                  "description": "A live Ren entity id (e.g. pod_…, prj_…, agt_…). Pins the spec entry to an existing row."
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                },
                "name": {
                  "type": "string"
                },
                "attachedPods": {
                  "description": "Slugs of pods this vault attaches to.",
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]*$",
                    "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                  }
                }
              },
              "required": [
                "id",
                "slug",
                "name"
              ]
            }
          },
          "fileStores": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                  "description": "A live Ren entity id (e.g. pod_…, prj_…, agt_…). Pins the spec entry to an existing row."
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "slug",
                "name"
              ]
            }
          },
          "memoryStores": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                  "description": "A live Ren entity id (e.g. pod_…, prj_…, agt_…). Pins the spec entry to an existing row."
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "slug",
                "name"
              ]
            }
          },
          "pods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                  "description": "A live Ren entity id (e.g. pod_…, prj_…, agt_…). Pins the spec entry to an existing row."
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                },
                "name": {
                  "type": "string"
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "org",
                    "user",
                    "registry"
                  ],
                  "description": "Visibility tier. Pods/projects/entities are created with the matching scope flag."
                }
              },
              "required": [
                "id",
                "slug",
                "name"
              ]
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                  "description": "A live Ren entity id (e.g. pod_…, prj_…, agt_…). Pins the spec entry to an existing row."
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                },
                "name": {
                  "type": "string"
                },
                "pod": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Slug of the pod this project lives in."
                },
                "agents": {
                  "description": "Agents attached to this project, with the mode each runs as.",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "projectAgentId": {
                        "type": "string",
                        "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                        "description": "Project-scoped membership ID. Use as assignedToProjectAgentId when assigning a task, not the agent slug or global agent ID."
                      },
                      "slug": {
                        "type": "string",
                        "pattern": "^[a-z0-9][a-z0-9-]*$",
                        "description": "Slug of the agent attached to this project."
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "subagent",
                          "all"
                        ],
                        "description": "Opencode agent mode this membership runs as."
                      }
                    },
                    "required": [
                      "projectAgentId",
                      "slug",
                      "mode"
                    ]
                  }
                },
                "fileStores": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]*$",
                    "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                  }
                },
                "memoryStores": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]*$",
                    "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                  }
                }
              },
              "required": [
                "id",
                "slug",
                "name",
                "pod"
              ]
            }
          },
          "slack": {
            "type": "object",
            "properties": {
              "workspace": {
                "type": "string"
              },
              "channels": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Channel name including the leading #, e.g. \"#bugs\"."
                    },
                    "project": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-z0-9][a-z0-9-]*$",
                          "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Slug of the project this channel maps to, or null if unmapped."
                    }
                  },
                  "required": [
                    "name",
                    "project"
                  ]
                }
              }
            },
            "required": [
              "channels"
            ]
          },
          "github": {
            "type": "object",
            "properties": {
              "repos": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The owner/repo the agent works in."
                    },
                    "project": {
                      "type": "string",
                      "pattern": "^[a-z0-9][a-z0-9-]*$",
                      "description": "Slug of the project this repo is bound to."
                    },
                    "baseBranch": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "project"
                  ]
                }
              }
            },
            "required": [
              "repos"
            ],
            "description": "GitHub repos bound to projects. Non-native to the upstream spec; a first-class Ren concept."
          },
          "triggers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                  "description": "A live Ren entity id (e.g. pod_…, prj_…, agt_…). Pins the spec entry to an existing row."
                },
                "slug": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Kebab-case slug used to reference an entity elsewhere in this spec."
                },
                "project": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Slug of the project whose meta agent this trigger fires."
                },
                "schedule": {
                  "type": "string",
                  "description": "Cron expression, e.g. \"0 9 * * 1\"."
                },
                "inputMessage": {
                  "type": "string",
                  "description": "Fixed prompt delivered to the agent on each fire."
                },
                "model": {
                  "$ref": "#/components/schemas/ModelSelection"
                }
              },
              "required": [
                "id",
                "slug",
                "project",
                "schedule",
                "inputMessage"
              ]
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z]+_[A-Za-z0-9]+$",
                  "description": "A live Ren entity id (e.g. pod_…, prj_…, agt_…). Pins the spec entry to an existing row."
                },
                "project": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]*$",
                  "description": "Slug of the project this mailbox routes inbound email to."
                },
                "localPart": {
                  "type": "string",
                  "description": "Local part of the mailbox address (before the @)."
                },
                "address": {
                  "type": "string",
                  "format": "email",
                  "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                  "description": "Full inbound email address for the project."
                }
              },
              "required": [
                "id",
                "project",
                "localPart",
                "address"
              ]
            }
          }
        },
        "required": [
          "meta",
          "agents",
          "pods",
          "projects"
        ]
      },
      "TopologyShare": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "shareToken": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "shareToken",
          "orgId",
          "userId",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "CronTrigger": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "projectAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "senderUserId": {
            "type": "string"
          },
          "inputMessage": {
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule": {
            "type": "string"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "isEnabled": {
            "type": "boolean"
          },
          "syncedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "projectId",
          "projectAgentId",
          "senderUserId",
          "inputMessage",
          "model",
          "schedule",
          "timezone",
          "until",
          "isEnabled",
          "syncedAt",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "CronTriggerDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "projectAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "senderUserId": {
            "type": "string"
          },
          "inputMessage": {
            "type": "string"
          },
          "model": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule": {
            "type": "string"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "isEnabled": {
            "type": "boolean"
          },
          "syncedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastRun": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  "status": {
                    "type": "string"
                  }
                },
                "required": [
                  "at",
                  "status"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Most recent fire pulled from the Temporal schedule; null before the first run or if the schedule is missing."
          },
          "nextRunAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next scheduled fire time from the Temporal schedule, if any."
          }
        },
        "required": [
          "id",
          "projectId",
          "projectAgentId",
          "senderUserId",
          "inputMessage",
          "model",
          "schedule",
          "timezone",
          "until",
          "isEnabled",
          "syncedAt",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "lastRun",
          "nextRunAt"
        ]
      },
      "WebhookTrigger": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "projectAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "senderUserId": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "generic",
              "linear"
            ]
          },
          "providerInstallId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scopeFilter": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "channelId": {
                    "type": "string"
                  },
                  "linearProjectId": {
                    "type": "string"
                  },
                  "linearProjectName": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "secretHash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isEnabled": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "projectId",
          "projectAgentId",
          "senderUserId",
          "provider",
          "providerInstallId",
          "scopeFilter",
          "secretHash",
          "isEnabled",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "WebhookTriggerCreateResult": {
        "type": "object",
        "properties": {
          "trigger": {
            "$ref": "#/components/schemas/WebhookTrigger"
          },
          "plaintextSecret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "trigger",
          "plaintextSecret"
        ]
      },
      "SlackOAuthStartResult": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "url"
        ]
      },
      "SlackOnboardingResolveResult": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "installed",
              "install_required",
              "conflict",
              "no_identity"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "status"
        ]
      },
      "SlackInstallationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "installedById": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "teamName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "botUserId": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "orgId",
          "installedById",
          "teamId",
          "teamName",
          "botUserId",
          "scope",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "SlackStatus": {
        "type": "object",
        "properties": {
          "hasInstallation": {
            "type": "boolean"
          },
          "installations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SlackInstallationResponse"
            }
          }
        },
        "required": [
          "hasInstallation",
          "installations"
        ]
      },
      "SlackChannel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isPrivate": {
            "type": "boolean"
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fallbackSenderUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "projectName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "isPrivate",
          "projectId",
          "fallbackSenderUserId",
          "projectName"
        ]
      },
      "ProjectEmailResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "podId": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "fallbackSenderUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "localPart": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "type": "string"
          },
          "projectName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "orgId",
          "podId",
          "projectId",
          "fallbackSenderUserId",
          "localPart",
          "createdAt",
          "updatedAt",
          "archivedAt",
          "address",
          "projectName"
        ]
      },
      "TelegramLinkCode": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "code",
          "url"
        ]
      },
      "TelegramLinkStatus": {
        "type": "object",
        "properties": {
          "linked": {
            "type": "boolean"
          },
          "telegramUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "linked",
          "telegramUserId"
        ]
      },
      "TelegramClaimCode": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "groupUrl": {
            "type": "string",
            "format": "uri"
          },
          "dmUrl": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "code",
          "groupUrl",
          "dmUrl"
        ]
      },
      "TelegramChat": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "chatId": {
            "type": "string"
          },
          "topicId": {
            "type": "string"
          },
          "chatTitle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chatType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "projectId": {
            "type": "string"
          },
          "claimedByUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fallbackSenderUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "allowedSenders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blockedSenders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "projectName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "chatId",
          "topicId",
          "chatTitle",
          "chatType",
          "projectId",
          "claimedByUserId",
          "fallbackSenderUserId",
          "allowedSenders",
          "blockedSenders",
          "createdAt",
          "updatedAt",
          "projectName"
        ]
      },
      "TelegramChatMapping": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "chatId": {
            "type": "string"
          },
          "topicId": {
            "type": "string"
          },
          "chatTitle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chatType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "projectId": {
            "type": "string"
          },
          "claimedByUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fallbackSenderUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "allowedSenders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blockedSenders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "chatId",
          "topicId",
          "chatTitle",
          "chatType",
          "projectId",
          "claimedByUserId",
          "fallbackSenderUserId",
          "allowedSenders",
          "blockedSenders",
          "createdAt",
          "updatedAt"
        ]
      },
      "LinearOAuthStartResult": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "url"
        ]
      },
      "LinearInstallation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "installedById": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "workspaceName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "appUserId": {
            "type": "string"
          },
          "accessTokenExpiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "orgId",
          "installedById",
          "workspaceId",
          "workspaceName",
          "appUserId",
          "accessTokenExpiresAt",
          "scope",
          "createdAt",
          "updatedAt",
          "archivedAt"
        ]
      },
      "LinearStatus": {
        "type": "object",
        "properties": {
          "hasInstallation": {
            "type": "boolean"
          },
          "installations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinearInstallation"
            }
          }
        },
        "required": [
          "hasInstallation",
          "installations"
        ]
      },
      "LinearProject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "LinearMapping": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "renProjectId": {
            "type": "string"
          },
          "renProjectName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "linearProjectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "linearProjectName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "senderUserId": {
            "type": "string"
          },
          "projectAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isEnabled": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "renProjectId",
          "renProjectName",
          "linearProjectId",
          "linearProjectName",
          "senderUserId",
          "projectAgentId",
          "isEnabled"
        ]
      },
      "Vault": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "podId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "orgId",
          "userId",
          "podId",
          "createdAt",
          "updatedAt"
        ]
      },
      "VaultDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "orgId": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "podId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "tier": {
            "type": "string",
            "enum": [
              "org",
              "pod",
              "user"
            ]
          },
          "credentialLimit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "orgId",
          "userId",
          "podId",
          "createdAt",
          "updatedAt",
          "tier",
          "credentialLimit"
        ]
      },
      "CredentialAuthPublic": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "bearer"
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "oauth"
              },
              "expiresAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "refresh": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "clientId": {
                        "type": "string"
                      },
                      "tokenEndpoint": {
                        "type": "string"
                      },
                      "tokenEndpointAuth": {
                        "type": "string",
                        "enum": [
                          "none",
                          "client_secret_basic",
                          "client_secret_post"
                        ]
                      },
                      "scope": {
                        "type": "string"
                      },
                      "resource": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "clientId"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "profile": {
                "anyOf": [
                  {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "service": {
                            "type": "string",
                            "const": "github"
                          },
                          "id": {
                            "type": "number"
                          },
                          "login": {
                            "type": "string"
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "service",
                          "id",
                          "login",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "service": {
                            "type": "string",
                            "const": "google_workspace"
                          },
                          "sub": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "hd": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "service",
                          "sub",
                          "email",
                          "name",
                          "hd"
                        ]
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "env"
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "basic"
              },
              "username": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "username"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "mcp_provider"
              },
              "provider": {
                "type": "string",
                "enum": [
                  "composio"
                ]
              },
              "userId": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "provider",
              "userId"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "custom"
              },
              "fieldNames": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "type",
              "fieldNames"
            ]
          }
        ]
      },
      "Credential": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "vaultId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "mcpId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "oauthAppId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "github",
                  "google_workspace"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "keyPreview": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "auth": {
            "$ref": "#/components/schemas/CredentialAuthPublic"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "vaultId",
          "name",
          "mcpId",
          "oauthAppId",
          "provider",
          "label",
          "keyPreview",
          "auth",
          "createdAt",
          "updatedAt"
        ]
      },
      "CredentialCreateAuth": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "bearer"
              },
              "token": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "token"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "oauth"
              },
              "accessToken": {
                "type": "string"
              },
              "expiresAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "refresh": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "clientId": {
                        "type": "string"
                      },
                      "refreshToken": {
                        "type": "string"
                      },
                      "clientSecret": {
                        "type": "string"
                      },
                      "tokenEndpoint": {
                        "type": "string"
                      },
                      "tokenEndpointAuth": {
                        "type": "string",
                        "enum": [
                          "none",
                          "client_secret_basic",
                          "client_secret_post"
                        ]
                      },
                      "scope": {
                        "type": "string"
                      },
                      "resource": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "clientId",
                      "refreshToken"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "profile": {
                "anyOf": [
                  {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "service": {
                            "type": "string",
                            "const": "github"
                          },
                          "id": {
                            "type": "number"
                          },
                          "login": {
                            "type": "string"
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "service",
                          "id",
                          "login",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "service": {
                            "type": "string",
                            "const": "google_workspace"
                          },
                          "sub": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "hd": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "service",
                          "sub",
                          "email",
                          "name",
                          "hd"
                        ]
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "type",
              "accessToken"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "env"
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "value"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "basic"
              },
              "username": {
                "type": "string"
              },
              "password": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "username",
              "password"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "custom"
              },
              "fields": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[a-z][A-Za-z0-9_]*$"
                },
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 4096
                }
              }
            },
            "required": [
              "type",
              "fields"
            ]
          }
        ]
      },
      "CreateCredentialBody": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "slot": {
                "type": "string",
                "const": "mcp",
                "description": "Tie this credential to one MCP server (pass its mcpId)."
              },
              "mcpId": {
                "type": "string",
                "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "auth": {
                "$ref": "#/components/schemas/CredentialCreateAuth"
              }
            },
            "required": [
              "slot",
              "mcpId",
              "name",
              "auth"
            ],
            "description": "A credential anchored to a single MCP server."
          },
          {
            "type": "object",
            "properties": {
              "slot": {
                "type": "string",
                "const": "env",
                "description": "Expose this credential to the workspace as a named environment variable."
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Z_][A-Z0-9_]*$",
                "description": "The env-var name; UPPER_SNAKE_CASE, unique within the vault."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "auth": {
                "$ref": "#/components/schemas/CredentialCreateAuth"
              }
            },
            "required": [
              "slot",
              "label",
              "name",
              "auth"
            ],
            "description": "A credential exposed as a named environment variable."
          }
        ],
        "description": "Create a credential in one of two slots. Adding to a slot that is already filled replaces it in place (that is what 'Reconnect' does). Labels double as environment-variable names and must be unique per vault."
      },
      "CredentialAuth": {
        "description": "Rotate the secret in place. The kind (bearer/oauth/env/basic) cannot change. Replacing an OAuth token without its renewal info (refresh token + token endpoint) disables automatic renewal.",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "bearer"
              },
              "token": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "token"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "oauth"
              },
              "accessToken": {
                "type": "string"
              },
              "expiresAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "refresh": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "clientId": {
                        "type": "string"
                      },
                      "refreshToken": {
                        "type": "string"
                      },
                      "clientSecret": {
                        "type": "string"
                      },
                      "tokenEndpoint": {
                        "type": "string"
                      },
                      "tokenEndpointAuth": {
                        "type": "string",
                        "enum": [
                          "none",
                          "client_secret_basic",
                          "client_secret_post"
                        ]
                      },
                      "scope": {
                        "type": "string"
                      },
                      "resource": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "clientId",
                      "refreshToken"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "profile": {
                "anyOf": [
                  {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "service": {
                            "type": "string",
                            "const": "github"
                          },
                          "id": {
                            "type": "number"
                          },
                          "login": {
                            "type": "string"
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "service",
                          "id",
                          "login",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "service": {
                            "type": "string",
                            "const": "google_workspace"
                          },
                          "sub": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "hd": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "service",
                          "sub",
                          "email",
                          "name",
                          "hd"
                        ]
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "type",
              "accessToken"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "env"
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "value"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "basic"
              },
              "username": {
                "type": "string"
              },
              "password": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "username",
              "password"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "mcp_provider"
              },
              "provider": {
                "type": "string",
                "enum": [
                  "composio"
                ]
              },
              "userId": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "type",
              "provider",
              "userId",
              "url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "custom"
              },
              "fields": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[a-z][A-Za-z0-9_]*$"
                },
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 4096
                }
              }
            },
            "required": [
              "type",
              "fields"
            ]
          }
        ]
      },
      "CredentialTransferResult": {
        "type": "object",
        "properties": {
          "target": {
            "$ref": "#/components/schemas/Credential"
          },
          "sourceCredentialId": {
            "type": "string"
          },
          "sourceDeleted": {
            "type": "boolean"
          },
          "replacedCredentialId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "target",
          "sourceCredentialId",
          "sourceDeleted",
          "replacedCredentialId"
        ]
      },
      "CredentialTransferInput": {
        "type": "object",
        "properties": {
          "targetVaultId": {
            "type": "string",
            "pattern": "^vlt_[0-9A-HJKMNP-TV-Z]{26}$"
          },
          "mode": {
            "default": "copy",
            "description": "copy duplicates the credential into the target vault; move relocates it (the source is deleted). Rotating tokens (oauth, mcp_provider) are move-only to avoid sharing a single-use token across vaults.",
            "type": "string",
            "enum": [
              "copy",
              "move"
            ]
          },
          "conflict": {
            "default": "fail",
            "description": "On an anchor clash in the target vault: fail rejects the transfer; replace deletes the loser.",
            "type": "string",
            "enum": [
              "fail",
              "replace"
            ]
          }
        },
        "required": [
          "targetVaultId"
        ]
      },
      "OAuthConnectResult": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "alreadyConnected": {
                "type": "boolean",
                "const": true
              },
              "credentialId": {
                "type": "string"
              }
            },
            "required": [
              "alreadyConnected",
              "credentialId"
            ]
          },
          {
            "type": "object",
            "properties": {
              "alreadyConnected": {
                "type": "boolean",
                "const": false
              },
              "authorizationUrl": {
                "type": "string"
              },
              "sessionId": {
                "type": "string"
              }
            },
            "required": [
              "alreadyConnected",
              "authorizationUrl",
              "sessionId"
            ]
          }
        ]
      },
      "OAuthConnectBody": {
        "type": "object",
        "properties": {
          "mcpId": {
            "type": "string",
            "pattern": "^mcp_[0-9A-HJKMNP-TV-Z]{26}$"
          },
          "scope": {
            "type": "string"
          }
        },
        "required": [
          "mcpId"
        ],
        "description": "Start 'Sign in with X' for an MCP. Needs a human with a browser: unless alreadyConnected, hand the returned authorizationUrl to the user and poll the session until it is complete, failed, or expired."
      },
      "OAuthSessionStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "complete",
              "failed",
              "expired"
            ],
            "description": "Poll until this is complete (credential stored), failed, or expired."
          },
          "mcpId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "credentialId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "failureReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "status",
          "mcpId",
          "credentialId",
          "failureReason",
          "expiresAt"
        ]
      },
      "BlueprintPublicListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "websiteMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/BlueprintKind"
          },
          "categories": {
            "$ref": "#/components/schemas/BlueprintCategories"
          },
          "publisherId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publisher": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublisherPublicView"
              },
              {
                "type": "null"
              }
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "resourceIds": {
            "type": "object",
            "properties": {
              "skillIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "mcpIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "skillIds",
              "mcpIds"
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "description",
          "icon",
          "websiteMetadata",
          "kind",
          "categories",
          "publisherId",
          "updatedAt",
          "resourceIds"
        ]
      },
      "BlueprintPublicView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "websiteMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/BlueprintKind"
          },
          "categories": {
            "$ref": "#/components/schemas/BlueprintCategories"
          },
          "publisherId": {
            "type": "string"
          },
          "publisher": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublisherPublicView"
              },
              {
                "type": "null"
              }
            ]
          },
          "template": {
            "$ref": "#/components/schemas/Spec"
          },
          "replays": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "examplePrompts": {
            "maxItems": 6,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Starter prompts the composer offers. Suggestions — unlike `initialPrompt`, nothing sends them."
          },
          "brandColor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^#[0-9a-f]{6}$",
                "description": "The vendor's own colour, for painting a ground behind a logo that only reads on one theme."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "description",
          "websiteMetadata",
          "kind",
          "categories",
          "publisherId",
          "template",
          "replays",
          "examplePrompts",
          "brandColor"
        ]
      },
      "ReplayPublicSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "title",
          "createdAt"
        ]
      },
      "ReplayPublicView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "websiteMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "session": {
            "$ref": "#/components/schemas/ReplayPublicSession"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReplayMessage"
            }
          }
        },
        "required": [
          "id",
          "slug",
          "createdAt",
          "websiteMetadata",
          "session",
          "messages"
        ]
      },
      "ReplayPresignDownloadResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "url",
          "expiresAt"
        ]
      }
    }
  }
}