{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenBot API",
    "version": "0.1.0",
    "description": "Headless REST API for OpenBot. To authenticate, send `Authorization: Bearer <user token>`. Create tokens at /v1/user/tokens. Every call needs a permission from a role or policy. Browser clients on the same origin can use the session Cookie instead. Then every write must send the exact public Origin.\n\nThis reference is made from the same contract that the server and the TypeScript client use, so it always matches the running OpenBot. [Download the OpenAPI document](/openapi.json) to use it with your own tools, such as a code generator. Every OpenBot also serves it at `/openapi.json`. See [Authentication](/docs/authentication) and [Permissions](/docs/permissions)."
  },
  "paths": {
    "/auth/developer/apps/callback": {
      "get": {
        "tags": [
          "Public developer tools"
        ],
        "operationId": "developerPublic.authorizationCallback",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "<No Content>"
          },
          "400": {
            "description": "DeveloperInputInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/inspect": {
      "post": {
        "tags": [
          "Public developer tools"
        ],
        "operationId": "developerPublic.inspect",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "input": {
                      "type": "string"
                    },
                    "checkedAt": {
                      "type": "number"
                    },
                    "apps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "candidate": {
                            "type": "object",
                            "properties": {
                              "cardUrl": {
                                "type": "string"
                              },
                              "card": {
                                "type": "object",
                                "properties": {
                                  "$schema": {
                                    "type": "string",
                                    "enum": [
                                      "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                    ]
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 2,
                                    "maxLength": 200
                                  },
                                  "version": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "description": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 100
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "websiteUrl": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "repository": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          },
                                          "source": {
                                            "type": "string"
                                          },
                                          "subfolder": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "id": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "url",
                                          "source"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "icons": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "src": {
                                              "type": "string"
                                            },
                                            "mimeType": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "sizes": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "theme": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "light",
                                                    "dark"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "src"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "remotes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "streamable-http",
                                                "sse"
                                              ]
                                            },
                                            "url": {
                                              "type": "string"
                                            },
                                            "headers": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "name": {
                                                        "type": "string"
                                                      },
                                                      "variables": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isRequired": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isSecret": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "format": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "string",
                                                                        "number",
                                                                        "boolean",
                                                                        "filepath"
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "default": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "placeholder": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "value": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "choices": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "allOf": [
                                                                {
                                                                  "type": "object",
                                                                  "additionalProperties": {}
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "name"
                                                    ],
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "supportedProtocolVersions": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "_meta": {
                                    "anyOf": [
                                      {
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "$schema",
                                  "name",
                                  "version",
                                  "description"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "endpoints": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "index": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "remote": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "streamable-http",
                                            "sse"
                                          ]
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "headers": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "description": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isRequired": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isSecret": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "format": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "string",
                                                          "number",
                                                          "boolean",
                                                          "filepath"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "default": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "placeholder": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "choices": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "variables": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "object",
                                                          "properties": {
                                                            "description": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isRequired": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isSecret": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "format": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "string",
                                                                    "number",
                                                                    "boolean",
                                                                    "filepath"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "default": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "placeholder": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "value": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "choices": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {}
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "variables": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "description": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isRequired": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isSecret": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "format": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "string",
                                                          "number",
                                                          "boolean",
                                                          "filepath"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "default": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "placeholder": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "choices": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "supportedProtocolVersions": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "url"
                                      ],
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {}
                                        }
                                      ]
                                    },
                                    "requirements": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "isSecret": {
                                            "type": "boolean"
                                          },
                                          "format": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "choices": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "isSecret"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "index",
                                    "remote",
                                    "requirements"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "sources": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "input",
                                        "page",
                                        "catalog",
                                        "card",
                                        "endpoint",
                                        "manual"
                                      ]
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "originalInput": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "url"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "cardUrl",
                              "card",
                              "endpoints",
                              "sources"
                            ],
                            "additionalProperties": false
                          },
                          "eligibility": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Eligible"
                                    ]
                                  },
                                  "entry": {
                                    "type": "object",
                                    "properties": {
                                      "cardUrl": {
                                        "type": "string"
                                      },
                                      "card": {
                                        "type": "object",
                                        "properties": {
                                          "$schema": {
                                            "type": "string",
                                            "enum": [
                                              "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                            ]
                                          },
                                          "name": {
                                            "type": "string",
                                            "minLength": 2,
                                            "maxLength": 200
                                          },
                                          "version": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 255
                                          },
                                          "description": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 100
                                          },
                                          "title": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 100
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "websiteUrl": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "repository": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "url": {
                                                    "type": "string"
                                                  },
                                                  "source": {
                                                    "type": "string"
                                                  },
                                                  "subfolder": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "id": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "url",
                                                  "source"
                                                ],
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "icons": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "src": {
                                                      "type": "string"
                                                    },
                                                    "mimeType": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "sizes": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "theme": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "light",
                                                            "dark"
                                                          ]
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "src"
                                                  ],
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "remotes": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "streamable-http",
                                                        "sse"
                                                      ]
                                                    },
                                                    "url": {
                                                      "type": "string"
                                                    },
                                                    "headers": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "description": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isRequired": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isSecret": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "format": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "string",
                                                                      "number",
                                                                      "boolean",
                                                                      "filepath"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "default": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "placeholder": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "choices": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              },
                                                              "variables": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "description": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "isRequired": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "boolean"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "isSecret": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "boolean"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "format": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "string",
                                                                                "number",
                                                                                "boolean",
                                                                                "filepath"
                                                                              ]
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "default": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "placeholder": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "choices": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string"
                                                                              }
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      "allOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "additionalProperties": {}
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "name"
                                                            ],
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "variables": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {
                                                            "type": "object",
                                                            "properties": {
                                                              "description": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isRequired": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isSecret": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "format": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "string",
                                                                      "number",
                                                                      "boolean",
                                                                      "filepath"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "default": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "placeholder": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "choices": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "supportedProtocolVersions": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "url"
                                                  ],
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "_meta": {
                                            "anyOf": [
                                              {
                                                "type": "object"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "$schema",
                                          "name",
                                          "version",
                                          "description"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      },
                                      "evidence": {
                                        "type": "array",
                                        "prefixItems": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "publisherUrl": {
                                                "type": "string"
                                              },
                                              "catalogUrl": {
                                                "type": "string"
                                              },
                                              "cardUrl": {
                                                "type": "string"
                                              },
                                              "association": {
                                                "type": "string",
                                                "enum": [
                                                  "CardOrigin",
                                                  "Website",
                                                  "CardLink"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "publisherUrl",
                                              "catalogUrl",
                                              "cardUrl",
                                              "association"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ],
                                        "minItems": 1,
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "publisherUrl": {
                                              "type": "string"
                                            },
                                            "catalogUrl": {
                                              "type": "string"
                                            },
                                            "cardUrl": {
                                              "type": "string"
                                            },
                                            "association": {
                                              "type": "string",
                                              "enum": [
                                                "CardOrigin",
                                                "Website",
                                                "CardLink"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "publisherUrl",
                                            "catalogUrl",
                                            "cardUrl",
                                            "association"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "checkedAt": {
                                        "type": "number"
                                      },
                                      "validators": {
                                        "type": "object",
                                        "properties": {
                                          "etag": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "lastModified": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "cardUrl",
                                      "card",
                                      "evidence",
                                      "checkedAt",
                                      "validators"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "stages": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "enum": [
                                            "Input",
                                            "Discovery",
                                            "CardRead",
                                            "CardSchema",
                                            "Compatibility",
                                            "PublisherAssociation",
                                            "Eligibility"
                                          ]
                                        },
                                        "source": {
                                          "type": "string"
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "Passed",
                                            "Failed",
                                            "Unconfirmed",
                                            "NotChecked"
                                          ]
                                        },
                                        "checkedAt": {
                                          "type": "number"
                                        },
                                        "reason": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "source",
                                        "status"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "entry",
                                  "stages"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Excluded"
                                    ]
                                  },
                                  "stages": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "enum": [
                                            "Input",
                                            "Discovery",
                                            "CardRead",
                                            "CardSchema",
                                            "Compatibility",
                                            "PublisherAssociation",
                                            "Eligibility"
                                          ]
                                        },
                                        "source": {
                                          "type": "string"
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "Passed",
                                            "Failed",
                                            "Unconfirmed",
                                            "NotChecked"
                                          ]
                                        },
                                        "checkedAt": {
                                          "type": "number"
                                        },
                                        "reason": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "source",
                                        "status"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "cardUrl": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string"
                                  },
                                  "withdraw": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "stages",
                                  "cardUrl",
                                  "reason",
                                  "withdraw"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Unconfirmed"
                                    ]
                                  },
                                  "stages": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "enum": [
                                            "Input",
                                            "Discovery",
                                            "CardRead",
                                            "CardSchema",
                                            "Compatibility",
                                            "PublisherAssociation",
                                            "Eligibility"
                                          ]
                                        },
                                        "source": {
                                          "type": "string"
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "Passed",
                                            "Failed",
                                            "Unconfirmed",
                                            "NotChecked"
                                          ]
                                        },
                                        "checkedAt": {
                                          "type": "number"
                                        },
                                        "reason": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "source",
                                        "status"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "cardUrl": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "issue": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "stages",
                                  "cardUrl",
                                  "reason",
                                  "url",
                                  "issue"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "stored": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Known"
                                    ]
                                  },
                                  "check": {
                                    "anyOf": [
                                      {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "_tag": {
                                                "type": "string",
                                                "enum": [
                                                  "Pending"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "_tag"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "_tag": {
                                                "type": "string",
                                                "enum": [
                                                  "Indexed"
                                                ]
                                              },
                                              "attemptedAt": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "_tag",
                                              "attemptedAt"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "_tag": {
                                                "type": "string",
                                                "enum": [
                                                  "Excluded"
                                                ]
                                              },
                                              "attemptedAt": {
                                                "type": "number"
                                              },
                                              "reason": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "_tag",
                                              "attemptedAt",
                                              "reason"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "_tag": {
                                                "type": "string",
                                                "enum": [
                                                  "Withdrawn"
                                                ]
                                              },
                                              "attemptedAt": {
                                                "type": "number"
                                              },
                                              "reason": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "_tag",
                                              "attemptedAt",
                                              "reason"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "_tag": {
                                                "type": "string",
                                                "enum": [
                                                  "Unconfirmed"
                                                ]
                                              },
                                              "attemptedAt": {
                                                "type": "number"
                                              },
                                              "reason": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "_tag",
                                              "attemptedAt",
                                              "reason"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "_tag": {
                                                "type": "string",
                                                "enum": [
                                                  "Failed"
                                                ]
                                              },
                                              "attemptedAt": {
                                                "type": "number"
                                              },
                                              "reason": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "_tag",
                                              "attemptedAt",
                                              "reason"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "check"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Unknown"
                                    ]
                                  }
                                },
                                "required": [
                                  "_tag"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "required": [
                          "candidate",
                          "eligibility",
                          "stored"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "impacts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "discovery",
                                "indexing",
                                "connection"
                              ]
                            }
                          },
                          "stage": {
                            "type": "string",
                            "enum": [
                              "publication",
                              "catalog",
                              "card",
                              "indexing"
                            ]
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "blocking",
                              "suggestion"
                            ]
                          },
                          "source": {
                            "type": "string"
                          },
                          "fieldPath": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "repair": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "stage",
                          "severity",
                          "source",
                          "message",
                          "repair"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "Input",
                              "Discovery",
                              "CardRead",
                              "CardSchema",
                              "Compatibility",
                              "PublisherAssociation",
                              "Eligibility"
                            ]
                          },
                          "source": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Passed",
                              "Failed",
                              "Unconfirmed",
                              "NotChecked"
                            ]
                          },
                          "checkedAt": {
                            "type": "number"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "source",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "input",
                    "checkedAt",
                    "apps",
                    "issues",
                    "stages"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8192
                  }
                },
                "required": [
                  "input"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/developer/personal-reports": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.personalReports",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "cardUrl": {
                        "type": "string"
                      },
                      "checkedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "cardUrl",
                      "checkedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/notifications": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.notifications",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "cardUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "IssueAppeared",
                          "IssueResolved",
                          "AccessChanged"
                        ]
                      },
                      "issue": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "impacts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "discovery",
                                    "indexing",
                                    "connection"
                                  ]
                                }
                              },
                              "stage": {
                                "type": "string",
                                "enum": [
                                  "publication",
                                  "catalog",
                                  "card",
                                  "indexing"
                                ]
                              },
                              "severity": {
                                "type": "string",
                                "enum": [
                                  "blocking",
                                  "suggestion"
                                ]
                              },
                              "source": {
                                "type": "string"
                              },
                              "fieldPath": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "repair": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "stage",
                              "severity",
                              "source",
                              "message",
                              "repair"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reason": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reportId": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "readAt": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "cardUrl",
                      "kind",
                      "issue",
                      "reason",
                      "reportId",
                      "createdAt",
                      "readAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/notifications/{id}/read": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.readNotification",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "IssueAppeared",
                        "IssueResolved",
                        "AccessChanged"
                      ]
                    },
                    "issue": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "impacts": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "discovery",
                                  "indexing",
                                  "connection"
                                ]
                              }
                            },
                            "stage": {
                              "type": "string",
                              "enum": [
                                "publication",
                                "catalog",
                                "card",
                                "indexing"
                              ]
                            },
                            "severity": {
                              "type": "string",
                              "enum": [
                                "blocking",
                                "suggestion"
                              ]
                            },
                            "source": {
                              "type": "string"
                            },
                            "fieldPath": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "repair": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "stage",
                            "severity",
                            "source",
                            "message",
                            "repair"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reportId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "readAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "kind",
                    "issue",
                    "reason",
                    "reportId",
                    "createdAt",
                    "readAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/subscriptions": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.subscriptions",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "cardUrl": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "cardUrl",
                      "enabled"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.subscribe",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cardUrl": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "cardUrl",
                    "enabled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cardUrl": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "cardUrl",
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/developer/indexing": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.requestIndexing",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "generation": {
                      "type": "string"
                    },
                    "acceptedAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Accepted",
                        "Waiting",
                        "Verifying",
                        "Completed"
                      ]
                    },
                    "check": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Pending"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Indexed"
                                  ]
                                },
                                "attemptedAt": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "_tag",
                                "attemptedAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Excluded"
                                  ]
                                },
                                "attemptedAt": {
                                  "type": "number"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "attemptedAt",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Withdrawn"
                                  ]
                                },
                                "attemptedAt": {
                                  "type": "number"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "attemptedAt",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Unconfirmed"
                                  ]
                                },
                                "attemptedAt": {
                                  "type": "number"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "attemptedAt",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Failed"
                                  ]
                                },
                                "attemptedAt": {
                                  "type": "number"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "attemptedAt",
                                "reason"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "restriction": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "cardUrl": {
                              "type": "string"
                            },
                            "reason": {
                              "type": "string",
                              "minLength": 1
                            },
                            "appealUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "cardUrl",
                            "reason",
                            "appealUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "generation",
                    "acceptedAt",
                    "status",
                    "check",
                    "restriction"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cardUrl": {
                    "type": "string"
                  }
                },
                "required": [
                  "cardUrl"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.indexingRequests",
        "parameters": [
          {
            "name": "cardUrl",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "cardUrl": {
                        "type": "string"
                      },
                      "generation": {
                        "type": "string"
                      },
                      "acceptedAt": {
                        "type": "number"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "Accepted",
                          "Waiting",
                          "Verifying",
                          "Completed"
                        ]
                      },
                      "check": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Pending"
                                    ]
                                  }
                                },
                                "required": [
                                  "_tag"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Indexed"
                                    ]
                                  },
                                  "attemptedAt": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "attemptedAt"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Excluded"
                                    ]
                                  },
                                  "attemptedAt": {
                                    "type": "number"
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "attemptedAt",
                                  "reason"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Withdrawn"
                                    ]
                                  },
                                  "attemptedAt": {
                                    "type": "number"
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "attemptedAt",
                                  "reason"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Unconfirmed"
                                    ]
                                  },
                                  "attemptedAt": {
                                    "type": "number"
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "attemptedAt",
                                  "reason"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Failed"
                                    ]
                                  },
                                  "attemptedAt": {
                                    "type": "number"
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "attemptedAt",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "restriction": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "cardUrl": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string",
                                "minLength": 1
                              },
                              "appealUrl": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "cardUrl",
                              "reason",
                              "appealUrl"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "cardUrl",
                      "generation",
                      "acceptedAt",
                      "status",
                      "check",
                      "restriction"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/indexing/{id}": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.indexingRequest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "generation": {
                      "type": "string"
                    },
                    "acceptedAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Accepted",
                        "Waiting",
                        "Verifying",
                        "Completed"
                      ]
                    },
                    "check": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Pending"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Indexed"
                                  ]
                                },
                                "attemptedAt": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "_tag",
                                "attemptedAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Excluded"
                                  ]
                                },
                                "attemptedAt": {
                                  "type": "number"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "attemptedAt",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Withdrawn"
                                  ]
                                },
                                "attemptedAt": {
                                  "type": "number"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "attemptedAt",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Unconfirmed"
                                  ]
                                },
                                "attemptedAt": {
                                  "type": "number"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "attemptedAt",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Failed"
                                  ]
                                },
                                "attemptedAt": {
                                  "type": "number"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "attemptedAt",
                                "reason"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "restriction": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "cardUrl": {
                              "type": "string"
                            },
                            "reason": {
                              "type": "string",
                              "minLength": 1
                            },
                            "appealUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "cardUrl",
                            "reason",
                            "appealUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "generation",
                    "acceptedAt",
                    "status",
                    "check",
                    "restriction"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/tests": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.createTest",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "candidate": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "$schema": {
                              "type": "string",
                              "enum": [
                                "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 200
                            },
                            "version": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "websiteUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "repository": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string"
                                    },
                                    "source": {
                                      "type": "string"
                                    },
                                    "subfolder": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "source"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "icons": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "src": {
                                        "type": "string"
                                      },
                                      "mimeType": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sizes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "theme": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "light",
                                              "dark"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "src"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "remotes": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "streamable-http",
                                          "sse"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "headers": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "variables": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "supportedProtocolVersions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "_meta": {
                              "anyOf": [
                                {
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "$schema",
                            "name",
                            "version",
                            "description"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "endpoints": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "remote": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "requirements": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "isSecret": {
                                      "type": "boolean"
                                    },
                                    "format": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "choices": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "isSecret"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "index",
                              "remote",
                              "requirements"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "role": {
                                "type": "string",
                                "enum": [
                                  "input",
                                  "page",
                                  "catalog",
                                  "card",
                                  "endpoint",
                                  "manual"
                                ]
                              },
                              "url": {
                                "type": "string"
                              },
                              "originalInput": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "role",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "cardUrl",
                        "card",
                        "endpoints",
                        "sources"
                      ],
                      "additionalProperties": false
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configurationKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "issuers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "requestedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Queued",
                        "Running",
                        "AwaitingConfiguration",
                        "AwaitingAuthorization",
                        "Succeeded",
                        "Failed",
                        "Cancelled",
                        "Interrupted"
                      ]
                    },
                    "checkedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "configuration",
                              "negotiation",
                              "tools",
                              "resources",
                              "resourceTemplates",
                              "prompts"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Passed",
                              "Failed",
                              "NotAdvertised",
                              "NotChecked"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "status",
                          "items",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "cleanup": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete"
                      ]
                    },
                    "cleanupRemote": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete",
                        "LocalOnly"
                      ]
                    },
                    "cleanupLocal": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Complete"
                      ]
                    },
                    "authorization": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "flowId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "Waiting",
                                "Received",
                                "Exchanging",
                                "Succeeded",
                                "Failed",
                                "Cancelled",
                                "Expired"
                              ]
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "expiresAt": {
                              "type": "number"
                            },
                            "authorizationUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "flowId",
                            "status",
                            "issuer",
                            "resource",
                            "scopes",
                            "expiresAt",
                            "authorizationUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "candidate",
                    "remoteIndex",
                    "endpoint",
                    "configurationKeys",
                    "issuers",
                    "requestedScopes",
                    "createdAt",
                    "expiresAt",
                    "status",
                    "checkedAt",
                    "stages",
                    "cleanup",
                    "cleanupRemote",
                    "cleanupLocal",
                    "authorization",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
                    "format": "uuid"
                  },
                  "cardUrl": {
                    "type": "string"
                  },
                  "remoteIndex": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "id",
                  "cardUrl",
                  "remoteIndex"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.tests",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "cardUrl": {
                        "type": "string"
                      },
                      "candidate": {
                        "type": "object",
                        "properties": {
                          "cardUrl": {
                            "type": "string"
                          },
                          "card": {
                            "type": "object",
                            "properties": {
                              "$schema": {
                                "type": "string",
                                "enum": [
                                  "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 2,
                                "maxLength": 200
                              },
                              "version": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "title": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "websiteUrl": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "repository": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "source": {
                                        "type": "string"
                                      },
                                      "subfolder": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "id": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url",
                                      "source"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "icons": {
                                "anyOf": [
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "src": {
                                          "type": "string"
                                        },
                                        "mimeType": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "sizes": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "theme": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "light",
                                                "dark"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "src"
                                      ],
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {}
                                        }
                                      ]
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "remotes": {
                                "anyOf": [
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "streamable-http",
                                            "sse"
                                          ]
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "headers": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "description": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isRequired": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isSecret": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "format": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "string",
                                                          "number",
                                                          "boolean",
                                                          "filepath"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "default": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "placeholder": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "choices": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "variables": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "object",
                                                          "properties": {
                                                            "description": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isRequired": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isSecret": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "format": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "string",
                                                                    "number",
                                                                    "boolean",
                                                                    "filepath"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "default": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "placeholder": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "value": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "choices": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {}
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "variables": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "description": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isRequired": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isSecret": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "format": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "string",
                                                          "number",
                                                          "boolean",
                                                          "filepath"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "default": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "placeholder": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "choices": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "supportedProtocolVersions": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "url"
                                      ],
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {}
                                        }
                                      ]
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "_meta": {
                                "anyOf": [
                                  {
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "$schema",
                              "name",
                              "version",
                              "description"
                            ],
                            "allOf": [
                              {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "endpoints": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "index": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "remote": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "streamable-http",
                                        "sse"
                                      ]
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "description": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isRequired": {
                                                "anyOf": [
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isSecret": {
                                                "anyOf": [
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "format": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "string",
                                                      "number",
                                                      "boolean",
                                                      "filepath"
                                                    ]
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "default": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "placeholder": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "choices": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "name": {
                                                "type": "string"
                                              },
                                              "variables": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                      "type": "object",
                                                      "properties": {
                                                        "description": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isRequired": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isSecret": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "format": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "string",
                                                                "number",
                                                                "boolean",
                                                                "filepath"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "default": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "placeholder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "choices": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "variables": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {
                                            "type": "object",
                                            "properties": {
                                              "description": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isRequired": {
                                                "anyOf": [
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isSecret": {
                                                "anyOf": [
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "format": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "string",
                                                      "number",
                                                      "boolean",
                                                      "filepath"
                                                    ]
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "default": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "placeholder": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "choices": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "supportedProtocolVersions": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "url"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                "requirements": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string"
                                      },
                                      "description": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "isSecret": {
                                        "type": "boolean"
                                      },
                                      "format": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "choices": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "isSecret"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "index",
                                "remote",
                                "requirements"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "sources": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "input",
                                    "page",
                                    "catalog",
                                    "card",
                                    "endpoint",
                                    "manual"
                                  ]
                                },
                                "url": {
                                  "type": "string"
                                },
                                "originalInput": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "role",
                                "url"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "cardUrl",
                          "card",
                          "endpoints",
                          "sources"
                        ],
                        "additionalProperties": false
                      },
                      "remoteIndex": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "endpoint": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "configurationKeys": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "issuers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "requestedScopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "expiresAt": {
                        "type": "number"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "Queued",
                          "Running",
                          "AwaitingConfiguration",
                          "AwaitingAuthorization",
                          "Succeeded",
                          "Failed",
                          "Cancelled",
                          "Interrupted"
                        ]
                      },
                      "checkedAt": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stages": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "configuration",
                                "negotiation",
                                "tools",
                                "resources",
                                "resourceTemplates",
                                "prompts"
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "Passed",
                                "Failed",
                                "NotAdvertised",
                                "NotChecked"
                              ]
                            },
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            },
                            "reason": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "status",
                            "items",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "cleanup": {
                        "type": "string",
                        "enum": [
                          "NotRequired",
                          "Pending",
                          "Complete"
                        ]
                      },
                      "cleanupRemote": {
                        "type": "string",
                        "enum": [
                          "NotRequired",
                          "Pending",
                          "Complete",
                          "LocalOnly"
                        ]
                      },
                      "cleanupLocal": {
                        "type": "string",
                        "enum": [
                          "Pending",
                          "Complete"
                        ]
                      },
                      "authorization": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "flowId": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "Waiting",
                                  "Received",
                                  "Exchanging",
                                  "Succeeded",
                                  "Failed",
                                  "Cancelled",
                                  "Expired"
                                ]
                              },
                              "issuer": {
                                "type": "string"
                              },
                              "resource": {
                                "type": "string"
                              },
                              "scopes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "expiresAt": {
                                "type": "number"
                              },
                              "authorizationUrl": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "flowId",
                              "status",
                              "issuer",
                              "resource",
                              "scopes",
                              "expiresAt",
                              "authorizationUrl"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reason": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "cardUrl",
                      "candidate",
                      "remoteIndex",
                      "endpoint",
                      "configurationKeys",
                      "issuers",
                      "requestedScopes",
                      "createdAt",
                      "expiresAt",
                      "status",
                      "checkedAt",
                      "stages",
                      "cleanup",
                      "cleanupRemote",
                      "cleanupLocal",
                      "authorization",
                      "reason"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/tests/{id}": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "candidate": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "$schema": {
                              "type": "string",
                              "enum": [
                                "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 200
                            },
                            "version": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "websiteUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "repository": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string"
                                    },
                                    "source": {
                                      "type": "string"
                                    },
                                    "subfolder": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "source"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "icons": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "src": {
                                        "type": "string"
                                      },
                                      "mimeType": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sizes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "theme": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "light",
                                              "dark"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "src"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "remotes": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "streamable-http",
                                          "sse"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "headers": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "variables": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "supportedProtocolVersions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "_meta": {
                              "anyOf": [
                                {
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "$schema",
                            "name",
                            "version",
                            "description"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "endpoints": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "remote": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "requirements": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "isSecret": {
                                      "type": "boolean"
                                    },
                                    "format": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "choices": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "isSecret"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "index",
                              "remote",
                              "requirements"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "role": {
                                "type": "string",
                                "enum": [
                                  "input",
                                  "page",
                                  "catalog",
                                  "card",
                                  "endpoint",
                                  "manual"
                                ]
                              },
                              "url": {
                                "type": "string"
                              },
                              "originalInput": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "role",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "cardUrl",
                        "card",
                        "endpoints",
                        "sources"
                      ],
                      "additionalProperties": false
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configurationKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "issuers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "requestedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Queued",
                        "Running",
                        "AwaitingConfiguration",
                        "AwaitingAuthorization",
                        "Succeeded",
                        "Failed",
                        "Cancelled",
                        "Interrupted"
                      ]
                    },
                    "checkedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "configuration",
                              "negotiation",
                              "tools",
                              "resources",
                              "resourceTemplates",
                              "prompts"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Passed",
                              "Failed",
                              "NotAdvertised",
                              "NotChecked"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "status",
                          "items",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "cleanup": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete"
                      ]
                    },
                    "cleanupRemote": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete",
                        "LocalOnly"
                      ]
                    },
                    "cleanupLocal": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Complete"
                      ]
                    },
                    "authorization": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "flowId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "Waiting",
                                "Received",
                                "Exchanging",
                                "Succeeded",
                                "Failed",
                                "Cancelled",
                                "Expired"
                              ]
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "expiresAt": {
                              "type": "number"
                            },
                            "authorizationUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "flowId",
                            "status",
                            "issuer",
                            "resource",
                            "scopes",
                            "expiresAt",
                            "authorizationUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "candidate",
                    "remoteIndex",
                    "endpoint",
                    "configurationKeys",
                    "issuers",
                    "requestedScopes",
                    "createdAt",
                    "expiresAt",
                    "status",
                    "checkedAt",
                    "stages",
                    "cleanup",
                    "cleanupRemote",
                    "cleanupLocal",
                    "authorization",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.deleteTest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "<No Content>"
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/tests/{id}/configuration": {
      "put": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.configureTest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "candidate": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "$schema": {
                              "type": "string",
                              "enum": [
                                "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 200
                            },
                            "version": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "websiteUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "repository": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string"
                                    },
                                    "source": {
                                      "type": "string"
                                    },
                                    "subfolder": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "source"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "icons": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "src": {
                                        "type": "string"
                                      },
                                      "mimeType": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sizes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "theme": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "light",
                                              "dark"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "src"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "remotes": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "streamable-http",
                                          "sse"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "headers": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "variables": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "supportedProtocolVersions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "_meta": {
                              "anyOf": [
                                {
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "$schema",
                            "name",
                            "version",
                            "description"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "endpoints": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "remote": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "requirements": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "isSecret": {
                                      "type": "boolean"
                                    },
                                    "format": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "choices": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "isSecret"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "index",
                              "remote",
                              "requirements"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "role": {
                                "type": "string",
                                "enum": [
                                  "input",
                                  "page",
                                  "catalog",
                                  "card",
                                  "endpoint",
                                  "manual"
                                ]
                              },
                              "url": {
                                "type": "string"
                              },
                              "originalInput": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "role",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "cardUrl",
                        "card",
                        "endpoints",
                        "sources"
                      ],
                      "additionalProperties": false
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configurationKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "issuers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "requestedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Queued",
                        "Running",
                        "AwaitingConfiguration",
                        "AwaitingAuthorization",
                        "Succeeded",
                        "Failed",
                        "Cancelled",
                        "Interrupted"
                      ]
                    },
                    "checkedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "configuration",
                              "negotiation",
                              "tools",
                              "resources",
                              "resourceTemplates",
                              "prompts"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Passed",
                              "Failed",
                              "NotAdvertised",
                              "NotChecked"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "status",
                          "items",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "cleanup": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete"
                      ]
                    },
                    "cleanupRemote": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete",
                        "LocalOnly"
                      ]
                    },
                    "cleanupLocal": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Complete"
                      ]
                    },
                    "authorization": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "flowId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "Waiting",
                                "Received",
                                "Exchanging",
                                "Succeeded",
                                "Failed",
                                "Cancelled",
                                "Expired"
                              ]
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "expiresAt": {
                              "type": "number"
                            },
                            "authorizationUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "flowId",
                            "status",
                            "issuer",
                            "resource",
                            "scopes",
                            "expiresAt",
                            "authorizationUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "candidate",
                    "remoteIndex",
                    "endpoint",
                    "configurationKeys",
                    "issuers",
                    "requestedScopes",
                    "createdAt",
                    "expiresAt",
                    "status",
                    "checkedAt",
                    "stages",
                    "cleanup",
                    "cleanupRemote",
                    "cleanupLocal",
                    "authorization",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/developer/tests/{id}/run": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.runTest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "candidate": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "$schema": {
                              "type": "string",
                              "enum": [
                                "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 200
                            },
                            "version": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "websiteUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "repository": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string"
                                    },
                                    "source": {
                                      "type": "string"
                                    },
                                    "subfolder": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "source"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "icons": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "src": {
                                        "type": "string"
                                      },
                                      "mimeType": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sizes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "theme": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "light",
                                              "dark"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "src"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "remotes": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "streamable-http",
                                          "sse"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "headers": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "variables": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "supportedProtocolVersions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "_meta": {
                              "anyOf": [
                                {
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "$schema",
                            "name",
                            "version",
                            "description"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "endpoints": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "remote": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "requirements": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "isSecret": {
                                      "type": "boolean"
                                    },
                                    "format": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "choices": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "isSecret"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "index",
                              "remote",
                              "requirements"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "role": {
                                "type": "string",
                                "enum": [
                                  "input",
                                  "page",
                                  "catalog",
                                  "card",
                                  "endpoint",
                                  "manual"
                                ]
                              },
                              "url": {
                                "type": "string"
                              },
                              "originalInput": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "role",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "cardUrl",
                        "card",
                        "endpoints",
                        "sources"
                      ],
                      "additionalProperties": false
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configurationKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "issuers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "requestedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Queued",
                        "Running",
                        "AwaitingConfiguration",
                        "AwaitingAuthorization",
                        "Succeeded",
                        "Failed",
                        "Cancelled",
                        "Interrupted"
                      ]
                    },
                    "checkedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "configuration",
                              "negotiation",
                              "tools",
                              "resources",
                              "resourceTemplates",
                              "prompts"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Passed",
                              "Failed",
                              "NotAdvertised",
                              "NotChecked"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "status",
                          "items",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "cleanup": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete"
                      ]
                    },
                    "cleanupRemote": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete",
                        "LocalOnly"
                      ]
                    },
                    "cleanupLocal": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Complete"
                      ]
                    },
                    "authorization": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "flowId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "Waiting",
                                "Received",
                                "Exchanging",
                                "Succeeded",
                                "Failed",
                                "Cancelled",
                                "Expired"
                              ]
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "expiresAt": {
                              "type": "number"
                            },
                            "authorizationUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "flowId",
                            "status",
                            "issuer",
                            "resource",
                            "scopes",
                            "expiresAt",
                            "authorizationUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "candidate",
                    "remoteIndex",
                    "endpoint",
                    "configurationKeys",
                    "issuers",
                    "requestedScopes",
                    "createdAt",
                    "expiresAt",
                    "status",
                    "checkedAt",
                    "stages",
                    "cleanup",
                    "cleanupRemote",
                    "cleanupLocal",
                    "authorization",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/tests/{id}/cancel": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.cancelTest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "candidate": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "$schema": {
                              "type": "string",
                              "enum": [
                                "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 200
                            },
                            "version": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "websiteUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "repository": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string"
                                    },
                                    "source": {
                                      "type": "string"
                                    },
                                    "subfolder": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "source"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "icons": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "src": {
                                        "type": "string"
                                      },
                                      "mimeType": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sizes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "theme": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "light",
                                              "dark"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "src"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "remotes": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "streamable-http",
                                          "sse"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "headers": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "variables": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "supportedProtocolVersions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "_meta": {
                              "anyOf": [
                                {
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "$schema",
                            "name",
                            "version",
                            "description"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "endpoints": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "remote": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "requirements": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "isSecret": {
                                      "type": "boolean"
                                    },
                                    "format": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "choices": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "isSecret"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "index",
                              "remote",
                              "requirements"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "role": {
                                "type": "string",
                                "enum": [
                                  "input",
                                  "page",
                                  "catalog",
                                  "card",
                                  "endpoint",
                                  "manual"
                                ]
                              },
                              "url": {
                                "type": "string"
                              },
                              "originalInput": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "role",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "cardUrl",
                        "card",
                        "endpoints",
                        "sources"
                      ],
                      "additionalProperties": false
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configurationKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "issuers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "requestedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Queued",
                        "Running",
                        "AwaitingConfiguration",
                        "AwaitingAuthorization",
                        "Succeeded",
                        "Failed",
                        "Cancelled",
                        "Interrupted"
                      ]
                    },
                    "checkedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "configuration",
                              "negotiation",
                              "tools",
                              "resources",
                              "resourceTemplates",
                              "prompts"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Passed",
                              "Failed",
                              "NotAdvertised",
                              "NotChecked"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "status",
                          "items",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "cleanup": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete"
                      ]
                    },
                    "cleanupRemote": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete",
                        "LocalOnly"
                      ]
                    },
                    "cleanupLocal": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Complete"
                      ]
                    },
                    "authorization": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "flowId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "Waiting",
                                "Received",
                                "Exchanging",
                                "Succeeded",
                                "Failed",
                                "Cancelled",
                                "Expired"
                              ]
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "expiresAt": {
                              "type": "number"
                            },
                            "authorizationUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "flowId",
                            "status",
                            "issuer",
                            "resource",
                            "scopes",
                            "expiresAt",
                            "authorizationUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "candidate",
                    "remoteIndex",
                    "endpoint",
                    "configurationKeys",
                    "issuers",
                    "requestedScopes",
                    "createdAt",
                    "expiresAt",
                    "status",
                    "checkedAt",
                    "stages",
                    "cleanup",
                    "cleanupRemote",
                    "cleanupLocal",
                    "authorization",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/tests/{id}/cleanup": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.cleanupTest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "candidate": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "$schema": {
                              "type": "string",
                              "enum": [
                                "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 200
                            },
                            "version": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "websiteUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "repository": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string"
                                    },
                                    "source": {
                                      "type": "string"
                                    },
                                    "subfolder": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "source"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "icons": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "src": {
                                        "type": "string"
                                      },
                                      "mimeType": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sizes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "theme": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "light",
                                              "dark"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "src"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "remotes": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "streamable-http",
                                          "sse"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "headers": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "variables": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "supportedProtocolVersions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "_meta": {
                              "anyOf": [
                                {
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "$schema",
                            "name",
                            "version",
                            "description"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "endpoints": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "remote": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "requirements": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "isSecret": {
                                      "type": "boolean"
                                    },
                                    "format": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "choices": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "isSecret"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "index",
                              "remote",
                              "requirements"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "role": {
                                "type": "string",
                                "enum": [
                                  "input",
                                  "page",
                                  "catalog",
                                  "card",
                                  "endpoint",
                                  "manual"
                                ]
                              },
                              "url": {
                                "type": "string"
                              },
                              "originalInput": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "role",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "cardUrl",
                        "card",
                        "endpoints",
                        "sources"
                      ],
                      "additionalProperties": false
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configurationKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "issuers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "requestedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Queued",
                        "Running",
                        "AwaitingConfiguration",
                        "AwaitingAuthorization",
                        "Succeeded",
                        "Failed",
                        "Cancelled",
                        "Interrupted"
                      ]
                    },
                    "checkedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "configuration",
                              "negotiation",
                              "tools",
                              "resources",
                              "resourceTemplates",
                              "prompts"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Passed",
                              "Failed",
                              "NotAdvertised",
                              "NotChecked"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "status",
                          "items",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "cleanup": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete"
                      ]
                    },
                    "cleanupRemote": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete",
                        "LocalOnly"
                      ]
                    },
                    "cleanupLocal": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Complete"
                      ]
                    },
                    "authorization": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "flowId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "Waiting",
                                "Received",
                                "Exchanging",
                                "Succeeded",
                                "Failed",
                                "Cancelled",
                                "Expired"
                              ]
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "expiresAt": {
                              "type": "number"
                            },
                            "authorizationUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "flowId",
                            "status",
                            "issuer",
                            "resource",
                            "scopes",
                            "expiresAt",
                            "authorizationUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "candidate",
                    "remoteIndex",
                    "endpoint",
                    "configurationKeys",
                    "issuers",
                    "requestedScopes",
                    "createdAt",
                    "expiresAt",
                    "status",
                    "checkedAt",
                    "stages",
                    "cleanup",
                    "cleanupRemote",
                    "cleanupLocal",
                    "authorization",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/tests/{id}/authorization": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.authorizeTest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "candidate": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "$schema": {
                              "type": "string",
                              "enum": [
                                "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 200
                            },
                            "version": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "websiteUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "repository": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string"
                                    },
                                    "source": {
                                      "type": "string"
                                    },
                                    "subfolder": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "source"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "icons": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "src": {
                                        "type": "string"
                                      },
                                      "mimeType": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sizes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "theme": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "light",
                                              "dark"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "src"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "remotes": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "streamable-http",
                                          "sse"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "headers": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "variables": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "supportedProtocolVersions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "_meta": {
                              "anyOf": [
                                {
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "$schema",
                            "name",
                            "version",
                            "description"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "endpoints": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "remote": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "requirements": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "isSecret": {
                                      "type": "boolean"
                                    },
                                    "format": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "choices": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "isSecret"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "index",
                              "remote",
                              "requirements"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "role": {
                                "type": "string",
                                "enum": [
                                  "input",
                                  "page",
                                  "catalog",
                                  "card",
                                  "endpoint",
                                  "manual"
                                ]
                              },
                              "url": {
                                "type": "string"
                              },
                              "originalInput": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "role",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "cardUrl",
                        "card",
                        "endpoints",
                        "sources"
                      ],
                      "additionalProperties": false
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configurationKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "issuers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "requestedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Queued",
                        "Running",
                        "AwaitingConfiguration",
                        "AwaitingAuthorization",
                        "Succeeded",
                        "Failed",
                        "Cancelled",
                        "Interrupted"
                      ]
                    },
                    "checkedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "configuration",
                              "negotiation",
                              "tools",
                              "resources",
                              "resourceTemplates",
                              "prompts"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Passed",
                              "Failed",
                              "NotAdvertised",
                              "NotChecked"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "status",
                          "items",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "cleanup": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete"
                      ]
                    },
                    "cleanupRemote": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete",
                        "LocalOnly"
                      ]
                    },
                    "cleanupLocal": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Complete"
                      ]
                    },
                    "authorization": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "flowId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "Waiting",
                                "Received",
                                "Exchanging",
                                "Succeeded",
                                "Failed",
                                "Cancelled",
                                "Expired"
                              ]
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "expiresAt": {
                              "type": "number"
                            },
                            "authorizationUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "flowId",
                            "status",
                            "issuer",
                            "resource",
                            "scopes",
                            "expiresAt",
                            "authorizationUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "candidate",
                    "remoteIndex",
                    "endpoint",
                    "configurationKeys",
                    "issuers",
                    "requestedScopes",
                    "createdAt",
                    "expiresAt",
                    "status",
                    "checkedAt",
                    "stages",
                    "cleanup",
                    "cleanupRemote",
                    "cleanupLocal",
                    "authorization",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "issuer": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/developer/tests/{id}/authorization/complete": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.completeTestAuthorization",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "candidate": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "$schema": {
                              "type": "string",
                              "enum": [
                                "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 200
                            },
                            "version": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "websiteUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "repository": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string"
                                    },
                                    "source": {
                                      "type": "string"
                                    },
                                    "subfolder": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "source"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "icons": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "src": {
                                        "type": "string"
                                      },
                                      "mimeType": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sizes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "theme": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "light",
                                              "dark"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "src"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "remotes": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "streamable-http",
                                          "sse"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "headers": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "variables": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "supportedProtocolVersions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "_meta": {
                              "anyOf": [
                                {
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "$schema",
                            "name",
                            "version",
                            "description"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "endpoints": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "remote": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "requirements": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "isSecret": {
                                      "type": "boolean"
                                    },
                                    "format": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "choices": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "isSecret"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "index",
                              "remote",
                              "requirements"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "role": {
                                "type": "string",
                                "enum": [
                                  "input",
                                  "page",
                                  "catalog",
                                  "card",
                                  "endpoint",
                                  "manual"
                                ]
                              },
                              "url": {
                                "type": "string"
                              },
                              "originalInput": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "role",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "cardUrl",
                        "card",
                        "endpoints",
                        "sources"
                      ],
                      "additionalProperties": false
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configurationKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "issuers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "requestedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Queued",
                        "Running",
                        "AwaitingConfiguration",
                        "AwaitingAuthorization",
                        "Succeeded",
                        "Failed",
                        "Cancelled",
                        "Interrupted"
                      ]
                    },
                    "checkedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "configuration",
                              "negotiation",
                              "tools",
                              "resources",
                              "resourceTemplates",
                              "prompts"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Passed",
                              "Failed",
                              "NotAdvertised",
                              "NotChecked"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "status",
                          "items",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "cleanup": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete"
                      ]
                    },
                    "cleanupRemote": {
                      "type": "string",
                      "enum": [
                        "NotRequired",
                        "Pending",
                        "Complete",
                        "LocalOnly"
                      ]
                    },
                    "cleanupLocal": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Complete"
                      ]
                    },
                    "authorization": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "flowId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "Waiting",
                                "Received",
                                "Exchanging",
                                "Succeeded",
                                "Failed",
                                "Cancelled",
                                "Expired"
                              ]
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "expiresAt": {
                              "type": "number"
                            },
                            "authorizationUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "flowId",
                            "status",
                            "issuer",
                            "resource",
                            "scopes",
                            "expiresAt",
                            "authorizationUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "candidate",
                    "remoteIndex",
                    "endpoint",
                    "configurationKeys",
                    "issuers",
                    "requestedScopes",
                    "createdAt",
                    "expiresAt",
                    "status",
                    "checkedAt",
                    "stages",
                    "cleanup",
                    "cleanupRemote",
                    "cleanupLocal",
                    "authorization",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.overview",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cardUrl": {
                            "type": "string"
                          },
                          "candidate": {
                            "type": "object",
                            "properties": {
                              "cardUrl": {
                                "type": "string"
                              },
                              "card": {
                                "type": "object",
                                "properties": {
                                  "$schema": {
                                    "type": "string",
                                    "enum": [
                                      "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                    ]
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 2,
                                    "maxLength": 200
                                  },
                                  "version": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "description": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 100
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "websiteUrl": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "repository": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          },
                                          "source": {
                                            "type": "string"
                                          },
                                          "subfolder": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "id": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "url",
                                          "source"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "icons": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "src": {
                                              "type": "string"
                                            },
                                            "mimeType": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "sizes": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "theme": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "light",
                                                    "dark"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "src"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "remotes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "streamable-http",
                                                "sse"
                                              ]
                                            },
                                            "url": {
                                              "type": "string"
                                            },
                                            "headers": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "name": {
                                                        "type": "string"
                                                      },
                                                      "variables": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isRequired": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isSecret": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "format": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "string",
                                                                        "number",
                                                                        "boolean",
                                                                        "filepath"
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "default": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "placeholder": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "value": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "choices": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "allOf": [
                                                                {
                                                                  "type": "object",
                                                                  "additionalProperties": {}
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "name"
                                                    ],
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "supportedProtocolVersions": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "_meta": {
                                    "anyOf": [
                                      {
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "$schema",
                                  "name",
                                  "version",
                                  "description"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "endpoints": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "index": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "remote": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "streamable-http",
                                            "sse"
                                          ]
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "headers": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "description": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isRequired": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isSecret": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "format": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "string",
                                                          "number",
                                                          "boolean",
                                                          "filepath"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "default": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "placeholder": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "choices": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "variables": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "object",
                                                          "properties": {
                                                            "description": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isRequired": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isSecret": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "format": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "string",
                                                                    "number",
                                                                    "boolean",
                                                                    "filepath"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "default": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "placeholder": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "value": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "choices": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {}
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "variables": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "description": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isRequired": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isSecret": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "format": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "string",
                                                          "number",
                                                          "boolean",
                                                          "filepath"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "default": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "placeholder": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "choices": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "supportedProtocolVersions": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "url"
                                      ],
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {}
                                        }
                                      ]
                                    },
                                    "requirements": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "isSecret": {
                                            "type": "boolean"
                                          },
                                          "format": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "choices": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "isSecret"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "index",
                                    "remote",
                                    "requirements"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "sources": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "input",
                                        "page",
                                        "catalog",
                                        "card",
                                        "endpoint",
                                        "manual"
                                      ]
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "originalInput": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "url"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "cardUrl",
                              "card",
                              "endpoints",
                              "sources"
                            ],
                            "additionalProperties": false
                          },
                          "grants": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "proofId": {
                                  "type": "string"
                                },
                                "memberId": {
                                  "type": "string"
                                },
                                "scope": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "PublisherHostname"
                                          ]
                                        },
                                        "hostname": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "hostname"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "AppCard"
                                          ]
                                        },
                                        "cardUrl": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "cardUrl"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "administrator",
                                    "maintainer",
                                    "viewer"
                                  ]
                                }
                              },
                              "required": [
                                "proofId",
                                "scope",
                                "role"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "cardUrl",
                          "candidate",
                          "grants"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "proofs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "transition": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "scope": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "PublisherHostname"
                                    ]
                                  },
                                  "hostname": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "hostname"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "AppCard"
                                    ]
                                  },
                                  "cardUrl": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "cardUrl"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Confirmed",
                              "Unconfirmed",
                              "Suspended",
                              "Relinquished"
                            ]
                          },
                          "confirmedAt": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "validUntil": {
                            "type": "number"
                          },
                          "nextVerificationAt": {
                            "type": "number"
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "transition",
                          "scope",
                          "status",
                          "confirmedAt",
                          "validUntil",
                          "nextVerificationAt",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "grants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "proofId": {
                            "type": "string"
                          },
                          "memberId": {
                            "type": "string"
                          },
                          "scope": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "PublisherHostname"
                                    ]
                                  },
                                  "hostname": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "hostname"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "AppCard"
                                    ]
                                  },
                                  "cardUrl": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "cardUrl"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "administrator",
                              "maintainer",
                              "viewer"
                            ]
                          }
                        },
                        "required": [
                          "proofId",
                          "scope",
                          "role"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "apps",
                    "proofs",
                    "grants"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/claims": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.startClaim",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "scope": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PublisherHostname"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "hostname"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AppCard"
                              ]
                            },
                            "cardUrl": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "cardUrl"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "token": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Confirmed",
                        "Revoked",
                        "Expired"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "scope",
                    "token",
                    "createdAt",
                    "expiresAt",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "_tag": {
                        "type": "string",
                        "enum": [
                          "PublisherHostname"
                        ]
                      },
                      "hostname": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "_tag",
                      "hostname"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "_tag": {
                        "type": "string",
                        "enum": [
                          "AppCard"
                        ]
                      },
                      "cardUrl": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "_tag",
                      "cardUrl"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/developer/claims/{id}": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.getClaim",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "scope": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PublisherHostname"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "hostname"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AppCard"
                              ]
                            },
                            "cardUrl": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "cardUrl"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "token": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Confirmed",
                        "Revoked",
                        "Expired"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "scope",
                    "token",
                    "createdAt",
                    "expiresAt",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/claims/{id}/verify": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.verifyClaim",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "transition": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "scope": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PublisherHostname"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "hostname"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AppCard"
                              ]
                            },
                            "cardUrl": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "cardUrl"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Confirmed",
                        "Unconfirmed",
                        "Suspended",
                        "Relinquished"
                      ]
                    },
                    "confirmedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "validUntil": {
                      "type": "number"
                    },
                    "nextVerificationAt": {
                      "type": "number"
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "transition",
                    "scope",
                    "status",
                    "confirmedAt",
                    "validUntil",
                    "nextVerificationAt",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/claims/{id}/revoke": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.revokeClaim",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "scope": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PublisherHostname"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "hostname"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AppCard"
                              ]
                            },
                            "cardUrl": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "cardUrl"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "token": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Confirmed",
                        "Revoked",
                        "Expired"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "scope",
                    "token",
                    "createdAt",
                    "expiresAt",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/proofs/{id}/verify": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.verifyProof",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "transition": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "scope": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PublisherHostname"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "hostname"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AppCard"
                              ]
                            },
                            "cardUrl": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "cardUrl"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Confirmed",
                        "Unconfirmed",
                        "Suspended",
                        "Relinquished"
                      ]
                    },
                    "confirmedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "validUntil": {
                      "type": "number"
                    },
                    "nextVerificationAt": {
                      "type": "number"
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "transition",
                    "scope",
                    "status",
                    "confirmedAt",
                    "validUntil",
                    "nextVerificationAt",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/proofs/{id}/relinquish": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.relinquish",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "transition": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "scope": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PublisherHostname"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "hostname"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AppCard"
                              ]
                            },
                            "cardUrl": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "cardUrl"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Confirmed",
                        "Unconfirmed",
                        "Suspended",
                        "Relinquished"
                      ]
                    },
                    "confirmedAt": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "validUntil": {
                      "type": "number"
                    },
                    "nextVerificationAt": {
                      "type": "number"
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "transition",
                    "scope",
                    "status",
                    "confirmedAt",
                    "validUntil",
                    "nextVerificationAt",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/proofs/{id}/members": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.members",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "proofId": {
                            "type": "string"
                          },
                          "identity": {
                            "type": "object",
                            "properties": {
                              "organizationId": {
                                "type": "string"
                              },
                              "userId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "organizationId",
                              "userId"
                            ],
                            "additionalProperties": false
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "maintainer",
                              "viewer"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "proofId",
                          "identity",
                          "role"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "invitations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "proofId": {
                            "type": "string"
                          },
                          "scope": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "PublisherHostname"
                                    ]
                                  },
                                  "hostname": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "hostname"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "AppCard"
                                    ]
                                  },
                                  "cardUrl": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "cardUrl"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "maintainer",
                              "viewer"
                            ]
                          },
                          "expiresAt": {
                            "type": "number"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Pending",
                              "Accepted",
                              "Revoked"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "proofId",
                          "scope",
                          "role",
                          "expiresAt",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "members",
                    "invitations"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/proofs/{id}/invitations": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.invite",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "proofId": {
                      "type": "string"
                    },
                    "scope": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PublisherHostname"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "hostname"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AppCard"
                              ]
                            },
                            "cardUrl": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "cardUrl"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "maintainer",
                        "viewer"
                      ]
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Accepted",
                        "Revoked"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "proofId",
                    "scope",
                    "role",
                    "expiresAt",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "maintainer",
                      "viewer"
                    ]
                  }
                },
                "required": [
                  "role"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/developer/invitations/{id}": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.invitation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "proofId": {
                      "type": "string"
                    },
                    "scope": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PublisherHostname"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "hostname"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AppCard"
                              ]
                            },
                            "cardUrl": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "cardUrl"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "maintainer",
                        "viewer"
                      ]
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Accepted",
                        "Revoked"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "proofId",
                    "scope",
                    "role",
                    "expiresAt",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/invitations/{id}/accept": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.acceptInvitation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "proofId": {
                      "type": "string"
                    },
                    "memberId": {
                      "type": "string"
                    },
                    "scope": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PublisherHostname"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "hostname"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AppCard"
                              ]
                            },
                            "cardUrl": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "cardUrl"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "administrator",
                        "maintainer",
                        "viewer"
                      ]
                    }
                  },
                  "required": [
                    "proofId",
                    "scope",
                    "role"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/invitations/{id}/revoke": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.revokeInvitation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "proofId": {
                      "type": "string"
                    },
                    "scope": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PublisherHostname"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "hostname"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AppCard"
                              ]
                            },
                            "cardUrl": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "_tag",
                            "cardUrl"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "maintainer",
                        "viewer"
                      ]
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Pending",
                        "Accepted",
                        "Revoked"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "proofId",
                    "scope",
                    "role",
                    "expiresAt",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/members/{id}": {
      "put": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.changeMember",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "proofId": {
                      "type": "string"
                    },
                    "identity": {
                      "type": "object",
                      "properties": {
                        "organizationId": {
                          "type": "string"
                        },
                        "userId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "organizationId",
                        "userId"
                      ],
                      "additionalProperties": false
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "maintainer",
                        "viewer"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "proofId",
                    "identity",
                    "role"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "maintainer",
                      "viewer"
                    ]
                  }
                },
                "required": [
                  "role"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.removeMember",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "<No Content>"
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/reports": {
      "post": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.saveInspection",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "report": {
                      "type": "object",
                      "properties": {
                        "input": {
                          "type": "string"
                        },
                        "checkedAt": {
                          "type": "number"
                        },
                        "apps": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "candidate": {
                                "type": "object",
                                "properties": {
                                  "cardUrl": {
                                    "type": "string"
                                  },
                                  "card": {
                                    "type": "object",
                                    "properties": {
                                      "$schema": {
                                        "type": "string",
                                        "enum": [
                                          "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 2,
                                        "maxLength": 200
                                      },
                                      "version": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "description": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 100
                                      },
                                      "title": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 100
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "websiteUrl": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "repository": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "source": {
                                                "type": "string"
                                              },
                                              "subfolder": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "id": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url",
                                              "source"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "icons": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "src": {
                                                  "type": "string"
                                                },
                                                "mimeType": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "sizes": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "theme": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "light",
                                                        "dark"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "src"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "remotes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "streamable-http",
                                                    "sse"
                                                  ]
                                                },
                                                "url": {
                                                  "type": "string"
                                                },
                                                "headers": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "variables": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "description": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isRequired": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isSecret": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "format": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "string",
                                                                            "number",
                                                                            "boolean",
                                                                            "filepath"
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "default": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "placeholder": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "choices": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "allOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "additionalProperties": {}
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "name"
                                                        ],
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "supportedProtocolVersions": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "url"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "_meta": {
                                        "anyOf": [
                                          {
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "$schema",
                                      "name",
                                      "version",
                                      "description"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  },
                                  "endpoints": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "index": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "remote": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "streamable-http",
                                                "sse"
                                              ]
                                            },
                                            "url": {
                                              "type": "string"
                                            },
                                            "headers": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "name": {
                                                        "type": "string"
                                                      },
                                                      "variables": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isRequired": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isSecret": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "format": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "string",
                                                                        "number",
                                                                        "boolean",
                                                                        "filepath"
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "default": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "placeholder": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "value": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "choices": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "allOf": [
                                                                {
                                                                  "type": "object",
                                                                  "additionalProperties": {}
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "name"
                                                    ],
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "supportedProtocolVersions": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        },
                                        "requirements": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "key": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isSecret": {
                                                "type": "boolean"
                                              },
                                              "format": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "choices": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "key",
                                              "isSecret"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "index",
                                        "remote",
                                        "requirements"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "sources": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "type": "string",
                                          "enum": [
                                            "input",
                                            "page",
                                            "catalog",
                                            "card",
                                            "endpoint",
                                            "manual"
                                          ]
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "originalInput": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "cardUrl",
                                  "card",
                                  "endpoints",
                                  "sources"
                                ],
                                "additionalProperties": false
                              },
                              "eligibility": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Eligible"
                                        ]
                                      },
                                      "entry": {
                                        "type": "object",
                                        "properties": {
                                          "cardUrl": {
                                            "type": "string"
                                          },
                                          "card": {
                                            "type": "object",
                                            "properties": {
                                              "$schema": {
                                                "type": "string",
                                                "enum": [
                                                  "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                                ]
                                              },
                                              "name": {
                                                "type": "string",
                                                "minLength": 2,
                                                "maxLength": 200
                                              },
                                              "version": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 255
                                              },
                                              "description": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 100
                                              },
                                              "title": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 100
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "websiteUrl": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "repository": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "url": {
                                                        "type": "string"
                                                      },
                                                      "source": {
                                                        "type": "string"
                                                      },
                                                      "subfolder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "id": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "url",
                                                      "source"
                                                    ],
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "icons": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "src": {
                                                          "type": "string"
                                                        },
                                                        "mimeType": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "sizes": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "theme": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "light",
                                                                "dark"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "src"
                                                      ],
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "remotes": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "streamable-http",
                                                            "sse"
                                                          ]
                                                        },
                                                        "url": {
                                                          "type": "string"
                                                        },
                                                        "headers": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "description": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isRequired": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isSecret": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "format": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "filepath"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "default": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "placeholder": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "choices": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "name": {
                                                                    "type": "string"
                                                                  },
                                                                  "variables": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "additionalProperties": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "description": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "isRequired": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "boolean"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "isSecret": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "boolean"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "format": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "string",
                                                                                    "number",
                                                                                    "boolean",
                                                                                    "filepath"
                                                                                  ]
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "default": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "placeholder": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "choices": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            }
                                                                          },
                                                                          "allOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "additionalProperties": {}
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "name"
                                                                ],
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "variables": {
                                                          "anyOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "description": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isRequired": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isSecret": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "format": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "filepath"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "default": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "placeholder": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "choices": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "supportedProtocolVersions": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "url"
                                                      ],
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "_meta": {
                                                "anyOf": [
                                                  {
                                                    "type": "object"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "$schema",
                                              "name",
                                              "version",
                                              "description"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          },
                                          "evidence": {
                                            "type": "array",
                                            "prefixItems": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "publisherUrl": {
                                                    "type": "string"
                                                  },
                                                  "catalogUrl": {
                                                    "type": "string"
                                                  },
                                                  "cardUrl": {
                                                    "type": "string"
                                                  },
                                                  "association": {
                                                    "type": "string",
                                                    "enum": [
                                                      "CardOrigin",
                                                      "Website",
                                                      "CardLink"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "publisherUrl",
                                                  "catalogUrl",
                                                  "cardUrl",
                                                  "association"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ],
                                            "minItems": 1,
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "publisherUrl": {
                                                  "type": "string"
                                                },
                                                "catalogUrl": {
                                                  "type": "string"
                                                },
                                                "cardUrl": {
                                                  "type": "string"
                                                },
                                                "association": {
                                                  "type": "string",
                                                  "enum": [
                                                    "CardOrigin",
                                                    "Website",
                                                    "CardLink"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "publisherUrl",
                                                "catalogUrl",
                                                "cardUrl",
                                                "association"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "checkedAt": {
                                            "type": "number"
                                          },
                                          "validators": {
                                            "type": "object",
                                            "properties": {
                                              "etag": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "lastModified": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "cardUrl",
                                          "card",
                                          "evidence",
                                          "checkedAt",
                                          "validators"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "stages": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "enum": [
                                                "Input",
                                                "Discovery",
                                                "CardRead",
                                                "CardSchema",
                                                "Compatibility",
                                                "PublisherAssociation",
                                                "Eligibility"
                                              ]
                                            },
                                            "source": {
                                              "type": "string"
                                            },
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "Passed",
                                                "Failed",
                                                "Unconfirmed",
                                                "NotChecked"
                                              ]
                                            },
                                            "checkedAt": {
                                              "type": "number"
                                            },
                                            "reason": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "source",
                                            "status"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "entry",
                                      "stages"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Excluded"
                                        ]
                                      },
                                      "stages": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "enum": [
                                                "Input",
                                                "Discovery",
                                                "CardRead",
                                                "CardSchema",
                                                "Compatibility",
                                                "PublisherAssociation",
                                                "Eligibility"
                                              ]
                                            },
                                            "source": {
                                              "type": "string"
                                            },
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "Passed",
                                                "Failed",
                                                "Unconfirmed",
                                                "NotChecked"
                                              ]
                                            },
                                            "checkedAt": {
                                              "type": "number"
                                            },
                                            "reason": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "source",
                                            "status"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "cardUrl": {
                                        "type": "string"
                                      },
                                      "reason": {
                                        "type": "string"
                                      },
                                      "withdraw": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "stages",
                                      "cardUrl",
                                      "reason",
                                      "withdraw"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Unconfirmed"
                                        ]
                                      },
                                      "stages": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "enum": [
                                                "Input",
                                                "Discovery",
                                                "CardRead",
                                                "CardSchema",
                                                "Compatibility",
                                                "PublisherAssociation",
                                                "Eligibility"
                                              ]
                                            },
                                            "source": {
                                              "type": "string"
                                            },
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "Passed",
                                                "Failed",
                                                "Unconfirmed",
                                                "NotChecked"
                                              ]
                                            },
                                            "checkedAt": {
                                              "type": "number"
                                            },
                                            "reason": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "source",
                                            "status"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "cardUrl": {
                                        "type": "string"
                                      },
                                      "reason": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "issue": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "stages",
                                      "cardUrl",
                                      "reason",
                                      "url",
                                      "issue"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "stored": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Known"
                                        ]
                                      },
                                      "check": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Pending"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "_tag"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Indexed"
                                                    ]
                                                  },
                                                  "attemptedAt": {
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "_tag",
                                                  "attemptedAt"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Excluded"
                                                    ]
                                                  },
                                                  "attemptedAt": {
                                                    "type": "number"
                                                  },
                                                  "reason": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "_tag",
                                                  "attemptedAt",
                                                  "reason"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Withdrawn"
                                                    ]
                                                  },
                                                  "attemptedAt": {
                                                    "type": "number"
                                                  },
                                                  "reason": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "_tag",
                                                  "attemptedAt",
                                                  "reason"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Unconfirmed"
                                                    ]
                                                  },
                                                  "attemptedAt": {
                                                    "type": "number"
                                                  },
                                                  "reason": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "_tag",
                                                  "attemptedAt",
                                                  "reason"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Failed"
                                                    ]
                                                  },
                                                  "attemptedAt": {
                                                    "type": "number"
                                                  },
                                                  "reason": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "_tag",
                                                  "attemptedAt",
                                                  "reason"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "check"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Unknown"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "required": [
                              "candidate",
                              "eligibility",
                              "stored"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "impacts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "discovery",
                                    "indexing",
                                    "connection"
                                  ]
                                }
                              },
                              "stage": {
                                "type": "string",
                                "enum": [
                                  "publication",
                                  "catalog",
                                  "card",
                                  "indexing"
                                ]
                              },
                              "severity": {
                                "type": "string",
                                "enum": [
                                  "blocking",
                                  "suggestion"
                                ]
                              },
                              "source": {
                                "type": "string"
                              },
                              "fieldPath": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "repair": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "stage",
                              "severity",
                              "source",
                              "message",
                              "repair"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "stages": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "Input",
                                  "Discovery",
                                  "CardRead",
                                  "CardSchema",
                                  "Compatibility",
                                  "PublisherAssociation",
                                  "Eligibility"
                                ]
                              },
                              "source": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "Passed",
                                  "Failed",
                                  "Unconfirmed",
                                  "NotChecked"
                                ]
                              },
                              "checkedAt": {
                                "type": "number"
                              },
                              "reason": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "source",
                              "status"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "input",
                        "checkedAt",
                        "apps",
                        "issues",
                        "stages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "createdBy",
                    "report"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cardUrl": {
                    "type": "string"
                  }
                },
                "required": [
                  "cardUrl"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.reports",
        "parameters": [
          {
            "name": "cardUrl",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "cardUrl": {
                        "type": "string"
                      },
                      "createdBy": {
                        "type": "string"
                      },
                      "report": {
                        "type": "object",
                        "properties": {
                          "input": {
                            "type": "string"
                          },
                          "checkedAt": {
                            "type": "number"
                          },
                          "apps": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "candidate": {
                                  "type": "object",
                                  "properties": {
                                    "cardUrl": {
                                      "type": "string"
                                    },
                                    "card": {
                                      "type": "object",
                                      "properties": {
                                        "$schema": {
                                          "type": "string",
                                          "enum": [
                                            "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                          ]
                                        },
                                        "name": {
                                          "type": "string",
                                          "minLength": 2,
                                          "maxLength": 200
                                        },
                                        "version": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 255
                                        },
                                        "description": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        },
                                        "title": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 100
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "websiteUrl": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "repository": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "url": {
                                                  "type": "string"
                                                },
                                                "source": {
                                                  "type": "string"
                                                },
                                                "subfolder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "id": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "url",
                                                "source"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "icons": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "src": {
                                                    "type": "string"
                                                  },
                                                  "mimeType": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "sizes": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "theme": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "light",
                                                          "dark"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "src"
                                                ],
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "remotes": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "enum": [
                                                      "streamable-http",
                                                      "sse"
                                                    ]
                                                  },
                                                  "url": {
                                                    "type": "string"
                                                  },
                                                  "headers": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "description": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isRequired": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isSecret": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "format": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "string",
                                                                    "number",
                                                                    "boolean",
                                                                    "filepath"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "default": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "placeholder": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "value": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "choices": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "name": {
                                                              "type": "string"
                                                            },
                                                            "variables": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "additionalProperties": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "description": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "isRequired": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "boolean"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "isSecret": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "boolean"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "format": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "string",
                                                                              "number",
                                                                              "boolean",
                                                                              "filepath"
                                                                            ]
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "default": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "placeholder": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "choices": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      }
                                                                    },
                                                                    "allOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "name"
                                                          ],
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {}
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "variables": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "object",
                                                          "properties": {
                                                            "description": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isRequired": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isSecret": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "format": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "string",
                                                                    "number",
                                                                    "boolean",
                                                                    "filepath"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "default": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "placeholder": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "value": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "choices": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {}
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "supportedProtocolVersions": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "url"
                                                ],
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "_meta": {
                                          "anyOf": [
                                            {
                                              "type": "object"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "$schema",
                                        "name",
                                        "version",
                                        "description"
                                      ],
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {}
                                        }
                                      ]
                                    },
                                    "endpoints": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "index": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "remote": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "streamable-http",
                                                  "sse"
                                                ]
                                              },
                                              "url": {
                                                "type": "string"
                                              },
                                              "headers": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "description": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isRequired": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isSecret": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "format": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "string",
                                                                "number",
                                                                "boolean",
                                                                "filepath"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "default": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "placeholder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "choices": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "variables": {
                                                          "anyOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "description": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isRequired": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isSecret": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "format": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "filepath"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "default": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "placeholder": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "choices": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "name"
                                                      ],
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "variables": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                      "type": "object",
                                                      "properties": {
                                                        "description": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isRequired": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isSecret": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "format": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "string",
                                                                "number",
                                                                "boolean",
                                                                "filepath"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "default": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "placeholder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "choices": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "supportedProtocolVersions": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          },
                                          "requirements": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "key": {
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "type": "boolean"
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "key",
                                                "isSecret"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "required": [
                                          "index",
                                          "remote",
                                          "requirements"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "sources": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "input",
                                              "page",
                                              "catalog",
                                              "card",
                                              "endpoint",
                                              "manual"
                                            ]
                                          },
                                          "url": {
                                            "type": "string"
                                          },
                                          "originalInput": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "url"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "cardUrl",
                                    "card",
                                    "endpoints",
                                    "sources"
                                  ],
                                  "additionalProperties": false
                                },
                                "eligibility": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Eligible"
                                          ]
                                        },
                                        "entry": {
                                          "type": "object",
                                          "properties": {
                                            "cardUrl": {
                                              "type": "string"
                                            },
                                            "card": {
                                              "type": "object",
                                              "properties": {
                                                "$schema": {
                                                  "type": "string",
                                                  "enum": [
                                                    "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string",
                                                  "minLength": 2,
                                                  "maxLength": 200
                                                },
                                                "version": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 255
                                                },
                                                "description": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 100
                                                },
                                                "title": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 100
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "websiteUrl": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "repository": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "url": {
                                                          "type": "string"
                                                        },
                                                        "source": {
                                                          "type": "string"
                                                        },
                                                        "subfolder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "id": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "url",
                                                        "source"
                                                      ],
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "icons": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "src": {
                                                            "type": "string"
                                                          },
                                                          "mimeType": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "sizes": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "theme": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "light",
                                                                  "dark"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "src"
                                                        ],
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "remotes": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "streamable-http",
                                                              "sse"
                                                            ]
                                                          },
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "headers": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "description": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isRequired": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isSecret": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "format": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "string",
                                                                            "number",
                                                                            "boolean",
                                                                            "filepath"
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "default": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "placeholder": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "choices": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "name": {
                                                                      "type": "string"
                                                                    },
                                                                    "variables": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "additionalProperties": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "description": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "string"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "isRequired": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "boolean"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "isSecret": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "boolean"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "format": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "string",
                                                                                      "number",
                                                                                      "boolean",
                                                                                      "filepath"
                                                                                    ]
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "default": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "string"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "placeholder": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "string"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "string"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "choices": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string"
                                                                                    }
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              }
                                                                            },
                                                                            "allOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "additionalProperties": {}
                                                                              }
                                                                            ]
                                                                          }
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "name"
                                                                  ],
                                                                  "allOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "additionalProperties": {}
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "variables": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "description": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isRequired": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isSecret": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "format": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "string",
                                                                            "number",
                                                                            "boolean",
                                                                            "filepath"
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "default": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "placeholder": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "choices": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "allOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "additionalProperties": {}
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "supportedProtocolVersions": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "_meta": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "$schema",
                                                "name",
                                                "version",
                                                "description"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            },
                                            "evidence": {
                                              "type": "array",
                                              "prefixItems": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "publisherUrl": {
                                                      "type": "string"
                                                    },
                                                    "catalogUrl": {
                                                      "type": "string"
                                                    },
                                                    "cardUrl": {
                                                      "type": "string"
                                                    },
                                                    "association": {
                                                      "type": "string",
                                                      "enum": [
                                                        "CardOrigin",
                                                        "Website",
                                                        "CardLink"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "publisherUrl",
                                                    "catalogUrl",
                                                    "cardUrl",
                                                    "association"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ],
                                              "minItems": 1,
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "publisherUrl": {
                                                    "type": "string"
                                                  },
                                                  "catalogUrl": {
                                                    "type": "string"
                                                  },
                                                  "cardUrl": {
                                                    "type": "string"
                                                  },
                                                  "association": {
                                                    "type": "string",
                                                    "enum": [
                                                      "CardOrigin",
                                                      "Website",
                                                      "CardLink"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "publisherUrl",
                                                  "catalogUrl",
                                                  "cardUrl",
                                                  "association"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "checkedAt": {
                                              "type": "number"
                                            },
                                            "validators": {
                                              "type": "object",
                                              "properties": {
                                                "etag": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "lastModified": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "cardUrl",
                                            "card",
                                            "evidence",
                                            "checkedAt",
                                            "validators"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "stages": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "enum": [
                                                  "Input",
                                                  "Discovery",
                                                  "CardRead",
                                                  "CardSchema",
                                                  "Compatibility",
                                                  "PublisherAssociation",
                                                  "Eligibility"
                                                ]
                                              },
                                              "source": {
                                                "type": "string"
                                              },
                                              "status": {
                                                "type": "string",
                                                "enum": [
                                                  "Passed",
                                                  "Failed",
                                                  "Unconfirmed",
                                                  "NotChecked"
                                                ]
                                              },
                                              "checkedAt": {
                                                "type": "number"
                                              },
                                              "reason": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name",
                                              "source",
                                              "status"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "entry",
                                        "stages"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Excluded"
                                          ]
                                        },
                                        "stages": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "enum": [
                                                  "Input",
                                                  "Discovery",
                                                  "CardRead",
                                                  "CardSchema",
                                                  "Compatibility",
                                                  "PublisherAssociation",
                                                  "Eligibility"
                                                ]
                                              },
                                              "source": {
                                                "type": "string"
                                              },
                                              "status": {
                                                "type": "string",
                                                "enum": [
                                                  "Passed",
                                                  "Failed",
                                                  "Unconfirmed",
                                                  "NotChecked"
                                                ]
                                              },
                                              "checkedAt": {
                                                "type": "number"
                                              },
                                              "reason": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name",
                                              "source",
                                              "status"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "cardUrl": {
                                          "type": "string"
                                        },
                                        "reason": {
                                          "type": "string"
                                        },
                                        "withdraw": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "stages",
                                        "cardUrl",
                                        "reason",
                                        "withdraw"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Unconfirmed"
                                          ]
                                        },
                                        "stages": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "enum": [
                                                  "Input",
                                                  "Discovery",
                                                  "CardRead",
                                                  "CardSchema",
                                                  "Compatibility",
                                                  "PublisherAssociation",
                                                  "Eligibility"
                                                ]
                                              },
                                              "source": {
                                                "type": "string"
                                              },
                                              "status": {
                                                "type": "string",
                                                "enum": [
                                                  "Passed",
                                                  "Failed",
                                                  "Unconfirmed",
                                                  "NotChecked"
                                                ]
                                              },
                                              "checkedAt": {
                                                "type": "number"
                                              },
                                              "reason": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name",
                                              "source",
                                              "status"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "cardUrl": {
                                          "type": "string"
                                        },
                                        "reason": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "issue": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "stages",
                                        "cardUrl",
                                        "reason",
                                        "url",
                                        "issue"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "stored": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Known"
                                          ]
                                        },
                                        "check": {
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "_tag": {
                                                      "type": "string",
                                                      "enum": [
                                                        "Pending"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "_tag"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "_tag": {
                                                      "type": "string",
                                                      "enum": [
                                                        "Indexed"
                                                      ]
                                                    },
                                                    "attemptedAt": {
                                                      "type": "number"
                                                    }
                                                  },
                                                  "required": [
                                                    "_tag",
                                                    "attemptedAt"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "_tag": {
                                                      "type": "string",
                                                      "enum": [
                                                        "Excluded"
                                                      ]
                                                    },
                                                    "attemptedAt": {
                                                      "type": "number"
                                                    },
                                                    "reason": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "_tag",
                                                    "attemptedAt",
                                                    "reason"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "_tag": {
                                                      "type": "string",
                                                      "enum": [
                                                        "Withdrawn"
                                                      ]
                                                    },
                                                    "attemptedAt": {
                                                      "type": "number"
                                                    },
                                                    "reason": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "_tag",
                                                    "attemptedAt",
                                                    "reason"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "_tag": {
                                                      "type": "string",
                                                      "enum": [
                                                        "Unconfirmed"
                                                      ]
                                                    },
                                                    "attemptedAt": {
                                                      "type": "number"
                                                    },
                                                    "reason": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "_tag",
                                                    "attemptedAt",
                                                    "reason"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "_tag": {
                                                      "type": "string",
                                                      "enum": [
                                                        "Failed"
                                                      ]
                                                    },
                                                    "attemptedAt": {
                                                      "type": "number"
                                                    },
                                                    "reason": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "_tag",
                                                    "attemptedAt",
                                                    "reason"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "check"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Unknown"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "candidate",
                                "eligibility",
                                "stored"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "issues": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "impacts": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "discovery",
                                      "indexing",
                                      "connection"
                                    ]
                                  }
                                },
                                "stage": {
                                  "type": "string",
                                  "enum": [
                                    "publication",
                                    "catalog",
                                    "card",
                                    "indexing"
                                  ]
                                },
                                "severity": {
                                  "type": "string",
                                  "enum": [
                                    "blocking",
                                    "suggestion"
                                  ]
                                },
                                "source": {
                                  "type": "string"
                                },
                                "fieldPath": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "repair": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "code",
                                "stage",
                                "severity",
                                "source",
                                "message",
                                "repair"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "stages": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "enum": [
                                    "Input",
                                    "Discovery",
                                    "CardRead",
                                    "CardSchema",
                                    "Compatibility",
                                    "PublisherAssociation",
                                    "Eligibility"
                                  ]
                                },
                                "source": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "Passed",
                                    "Failed",
                                    "Unconfirmed",
                                    "NotChecked"
                                  ]
                                },
                                "checkedAt": {
                                  "type": "number"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name",
                                "source",
                                "status"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "input",
                          "checkedAt",
                          "apps",
                          "issues",
                          "stages"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "cardUrl",
                      "createdBy",
                      "report"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/reports/{id}": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.report",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "cardUrl": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "report": {
                      "type": "object",
                      "properties": {
                        "input": {
                          "type": "string"
                        },
                        "checkedAt": {
                          "type": "number"
                        },
                        "apps": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "candidate": {
                                "type": "object",
                                "properties": {
                                  "cardUrl": {
                                    "type": "string"
                                  },
                                  "card": {
                                    "type": "object",
                                    "properties": {
                                      "$schema": {
                                        "type": "string",
                                        "enum": [
                                          "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 2,
                                        "maxLength": 200
                                      },
                                      "version": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "description": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 100
                                      },
                                      "title": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 100
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "websiteUrl": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "repository": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "source": {
                                                "type": "string"
                                              },
                                              "subfolder": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "id": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url",
                                              "source"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "icons": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "src": {
                                                  "type": "string"
                                                },
                                                "mimeType": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "sizes": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "theme": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "light",
                                                        "dark"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "src"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "remotes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "streamable-http",
                                                    "sse"
                                                  ]
                                                },
                                                "url": {
                                                  "type": "string"
                                                },
                                                "headers": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "variables": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "description": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isRequired": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isSecret": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "format": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "string",
                                                                            "number",
                                                                            "boolean",
                                                                            "filepath"
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "default": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "placeholder": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "choices": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "allOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "additionalProperties": {}
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "name"
                                                        ],
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "supportedProtocolVersions": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "url"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "_meta": {
                                        "anyOf": [
                                          {
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "$schema",
                                      "name",
                                      "version",
                                      "description"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  },
                                  "endpoints": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "index": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "remote": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "streamable-http",
                                                "sse"
                                              ]
                                            },
                                            "url": {
                                              "type": "string"
                                            },
                                            "headers": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "name": {
                                                        "type": "string"
                                                      },
                                                      "variables": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isRequired": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isSecret": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "format": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "string",
                                                                        "number",
                                                                        "boolean",
                                                                        "filepath"
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "default": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "placeholder": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "value": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "choices": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "allOf": [
                                                                {
                                                                  "type": "object",
                                                                  "additionalProperties": {}
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "name"
                                                    ],
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "supportedProtocolVersions": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        },
                                        "requirements": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "key": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isSecret": {
                                                "type": "boolean"
                                              },
                                              "format": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "choices": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "key",
                                              "isSecret"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "index",
                                        "remote",
                                        "requirements"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "sources": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "type": "string",
                                          "enum": [
                                            "input",
                                            "page",
                                            "catalog",
                                            "card",
                                            "endpoint",
                                            "manual"
                                          ]
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "originalInput": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "cardUrl",
                                  "card",
                                  "endpoints",
                                  "sources"
                                ],
                                "additionalProperties": false
                              },
                              "eligibility": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Eligible"
                                        ]
                                      },
                                      "entry": {
                                        "type": "object",
                                        "properties": {
                                          "cardUrl": {
                                            "type": "string"
                                          },
                                          "card": {
                                            "type": "object",
                                            "properties": {
                                              "$schema": {
                                                "type": "string",
                                                "enum": [
                                                  "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                                ]
                                              },
                                              "name": {
                                                "type": "string",
                                                "minLength": 2,
                                                "maxLength": 200
                                              },
                                              "version": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 255
                                              },
                                              "description": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 100
                                              },
                                              "title": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 100
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "websiteUrl": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "repository": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "url": {
                                                        "type": "string"
                                                      },
                                                      "source": {
                                                        "type": "string"
                                                      },
                                                      "subfolder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "id": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "url",
                                                      "source"
                                                    ],
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "icons": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "src": {
                                                          "type": "string"
                                                        },
                                                        "mimeType": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "sizes": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "theme": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "light",
                                                                "dark"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "src"
                                                      ],
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "remotes": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "streamable-http",
                                                            "sse"
                                                          ]
                                                        },
                                                        "url": {
                                                          "type": "string"
                                                        },
                                                        "headers": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "description": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isRequired": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isSecret": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "format": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "filepath"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "default": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "placeholder": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "choices": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "name": {
                                                                    "type": "string"
                                                                  },
                                                                  "variables": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "additionalProperties": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "description": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "isRequired": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "boolean"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "isSecret": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "boolean"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "format": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "string",
                                                                                    "number",
                                                                                    "boolean",
                                                                                    "filepath"
                                                                                  ]
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "default": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "placeholder": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "choices": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            }
                                                                          },
                                                                          "allOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "additionalProperties": {}
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "name"
                                                                ],
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "variables": {
                                                          "anyOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "description": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isRequired": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isSecret": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "format": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "filepath"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "default": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "placeholder": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "choices": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "supportedProtocolVersions": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "url"
                                                      ],
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "_meta": {
                                                "anyOf": [
                                                  {
                                                    "type": "object"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "$schema",
                                              "name",
                                              "version",
                                              "description"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          },
                                          "evidence": {
                                            "type": "array",
                                            "prefixItems": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "publisherUrl": {
                                                    "type": "string"
                                                  },
                                                  "catalogUrl": {
                                                    "type": "string"
                                                  },
                                                  "cardUrl": {
                                                    "type": "string"
                                                  },
                                                  "association": {
                                                    "type": "string",
                                                    "enum": [
                                                      "CardOrigin",
                                                      "Website",
                                                      "CardLink"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "publisherUrl",
                                                  "catalogUrl",
                                                  "cardUrl",
                                                  "association"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ],
                                            "minItems": 1,
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "publisherUrl": {
                                                  "type": "string"
                                                },
                                                "catalogUrl": {
                                                  "type": "string"
                                                },
                                                "cardUrl": {
                                                  "type": "string"
                                                },
                                                "association": {
                                                  "type": "string",
                                                  "enum": [
                                                    "CardOrigin",
                                                    "Website",
                                                    "CardLink"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "publisherUrl",
                                                "catalogUrl",
                                                "cardUrl",
                                                "association"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "checkedAt": {
                                            "type": "number"
                                          },
                                          "validators": {
                                            "type": "object",
                                            "properties": {
                                              "etag": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "lastModified": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "cardUrl",
                                          "card",
                                          "evidence",
                                          "checkedAt",
                                          "validators"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "stages": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "enum": [
                                                "Input",
                                                "Discovery",
                                                "CardRead",
                                                "CardSchema",
                                                "Compatibility",
                                                "PublisherAssociation",
                                                "Eligibility"
                                              ]
                                            },
                                            "source": {
                                              "type": "string"
                                            },
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "Passed",
                                                "Failed",
                                                "Unconfirmed",
                                                "NotChecked"
                                              ]
                                            },
                                            "checkedAt": {
                                              "type": "number"
                                            },
                                            "reason": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "source",
                                            "status"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "entry",
                                      "stages"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Excluded"
                                        ]
                                      },
                                      "stages": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "enum": [
                                                "Input",
                                                "Discovery",
                                                "CardRead",
                                                "CardSchema",
                                                "Compatibility",
                                                "PublisherAssociation",
                                                "Eligibility"
                                              ]
                                            },
                                            "source": {
                                              "type": "string"
                                            },
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "Passed",
                                                "Failed",
                                                "Unconfirmed",
                                                "NotChecked"
                                              ]
                                            },
                                            "checkedAt": {
                                              "type": "number"
                                            },
                                            "reason": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "source",
                                            "status"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "cardUrl": {
                                        "type": "string"
                                      },
                                      "reason": {
                                        "type": "string"
                                      },
                                      "withdraw": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "stages",
                                      "cardUrl",
                                      "reason",
                                      "withdraw"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Unconfirmed"
                                        ]
                                      },
                                      "stages": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "enum": [
                                                "Input",
                                                "Discovery",
                                                "CardRead",
                                                "CardSchema",
                                                "Compatibility",
                                                "PublisherAssociation",
                                                "Eligibility"
                                              ]
                                            },
                                            "source": {
                                              "type": "string"
                                            },
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "Passed",
                                                "Failed",
                                                "Unconfirmed",
                                                "NotChecked"
                                              ]
                                            },
                                            "checkedAt": {
                                              "type": "number"
                                            },
                                            "reason": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "source",
                                            "status"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "cardUrl": {
                                        "type": "string"
                                      },
                                      "reason": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "issue": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "stages",
                                      "cardUrl",
                                      "reason",
                                      "url",
                                      "issue"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "stored": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Known"
                                        ]
                                      },
                                      "check": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Pending"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "_tag"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Indexed"
                                                    ]
                                                  },
                                                  "attemptedAt": {
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "_tag",
                                                  "attemptedAt"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Excluded"
                                                    ]
                                                  },
                                                  "attemptedAt": {
                                                    "type": "number"
                                                  },
                                                  "reason": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "_tag",
                                                  "attemptedAt",
                                                  "reason"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Withdrawn"
                                                    ]
                                                  },
                                                  "attemptedAt": {
                                                    "type": "number"
                                                  },
                                                  "reason": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "_tag",
                                                  "attemptedAt",
                                                  "reason"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Unconfirmed"
                                                    ]
                                                  },
                                                  "attemptedAt": {
                                                    "type": "number"
                                                  },
                                                  "reason": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "_tag",
                                                  "attemptedAt",
                                                  "reason"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "_tag": {
                                                    "type": "string",
                                                    "enum": [
                                                      "Failed"
                                                    ]
                                                  },
                                                  "attemptedAt": {
                                                    "type": "number"
                                                  },
                                                  "reason": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "_tag",
                                                  "attemptedAt",
                                                  "reason"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "check"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Unknown"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "required": [
                              "candidate",
                              "eligibility",
                              "stored"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "impacts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "discovery",
                                    "indexing",
                                    "connection"
                                  ]
                                }
                              },
                              "stage": {
                                "type": "string",
                                "enum": [
                                  "publication",
                                  "catalog",
                                  "card",
                                  "indexing"
                                ]
                              },
                              "severity": {
                                "type": "string",
                                "enum": [
                                  "blocking",
                                  "suggestion"
                                ]
                              },
                              "source": {
                                "type": "string"
                              },
                              "fieldPath": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "repair": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "stage",
                              "severity",
                              "source",
                              "message",
                              "repair"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "stages": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "Input",
                                  "Discovery",
                                  "CardRead",
                                  "CardSchema",
                                  "Compatibility",
                                  "PublisherAssociation",
                                  "Eligibility"
                                ]
                              },
                              "source": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "Passed",
                                  "Failed",
                                  "Unconfirmed",
                                  "NotChecked"
                                ]
                              },
                              "checkedAt": {
                                "type": "number"
                              },
                              "reason": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "source",
                              "status"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "input",
                        "checkedAt",
                        "apps",
                        "issues",
                        "stages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "cardUrl",
                    "createdBy",
                    "report"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.deleteReport",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "<No Content>"
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/reports/{id}/compare": {
      "get": {
        "tags": [
          "Developer tools"
        ],
        "operationId": "developer.compare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "other",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "introduced": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "impacts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "discovery",
                                "indexing",
                                "connection"
                              ]
                            }
                          },
                          "stage": {
                            "type": "string",
                            "enum": [
                              "publication",
                              "catalog",
                              "card",
                              "indexing"
                            ]
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "blocking",
                              "suggestion"
                            ]
                          },
                          "source": {
                            "type": "string"
                          },
                          "fieldPath": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "repair": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "stage",
                          "severity",
                          "source",
                          "message",
                          "repair"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "resolved": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "impacts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "discovery",
                                "indexing",
                                "connection"
                              ]
                            }
                          },
                          "stage": {
                            "type": "string",
                            "enum": [
                              "publication",
                              "catalog",
                              "card",
                              "indexing"
                            ]
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "blocking",
                              "suggestion"
                            ]
                          },
                          "source": {
                            "type": "string"
                          },
                          "fieldPath": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "repair": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "stage",
                          "severity",
                          "source",
                          "message",
                          "repair"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "persisting": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "impacts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "discovery",
                                "indexing",
                                "connection"
                              ]
                            }
                          },
                          "stage": {
                            "type": "string",
                            "enum": [
                              "publication",
                              "catalog",
                              "card",
                              "indexing"
                            ]
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "blocking",
                              "suggestion"
                            ]
                          },
                          "source": {
                            "type": "string"
                          },
                          "fieldPath": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "repair": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "stage",
                          "severity",
                          "source",
                          "message",
                          "repair"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "introduced",
                    "resolved",
                    "persisting"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "DeveloperInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "DeveloperRestricted | DeveloperForbidden | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DeveloperForbiddenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DeveloperNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "DeveloperConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "DeveloperUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DeveloperUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-index/sources": {
      "get": {
        "tags": [
          "App Index"
        ],
        "operationId": "appIndex.listSources",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "url": {
                        "type": "string"
                      },
                      "simulated": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "url",
                      "simulated"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-index/apps": {
      "get": {
        "tags": [
          "App Index"
        ],
        "operationId": "appIndex.searchApps",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "required": false
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": false
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 8192
            },
            "required": false
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "entry": {
                            "type": "object",
                            "properties": {
                              "cardUrl": {
                                "type": "string"
                              },
                              "card": {
                                "type": "object",
                                "properties": {
                                  "$schema": {
                                    "type": "string",
                                    "enum": [
                                      "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                    ]
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 2,
                                    "maxLength": 200
                                  },
                                  "version": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "description": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 100
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "websiteUrl": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "repository": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          },
                                          "source": {
                                            "type": "string"
                                          },
                                          "subfolder": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "id": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "url",
                                          "source"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "icons": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "src": {
                                              "type": "string"
                                            },
                                            "mimeType": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "sizes": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "theme": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "light",
                                                    "dark"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "src"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "remotes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "streamable-http",
                                                "sse"
                                              ]
                                            },
                                            "url": {
                                              "type": "string"
                                            },
                                            "headers": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "name": {
                                                        "type": "string"
                                                      },
                                                      "variables": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isRequired": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isSecret": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "format": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "string",
                                                                        "number",
                                                                        "boolean",
                                                                        "filepath"
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "default": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "placeholder": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "value": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "choices": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "allOf": [
                                                                {
                                                                  "type": "object",
                                                                  "additionalProperties": {}
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "name"
                                                    ],
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "supportedProtocolVersions": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "_meta": {
                                    "anyOf": [
                                      {
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "$schema",
                                  "name",
                                  "version",
                                  "description"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "evidence": {
                                "type": "array",
                                "prefixItems": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "publisherUrl": {
                                        "type": "string"
                                      },
                                      "catalogUrl": {
                                        "type": "string"
                                      },
                                      "cardUrl": {
                                        "type": "string"
                                      },
                                      "association": {
                                        "type": "string",
                                        "enum": [
                                          "CardOrigin",
                                          "Website",
                                          "CardLink"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "publisherUrl",
                                      "catalogUrl",
                                      "cardUrl",
                                      "association"
                                    ],
                                    "additionalProperties": false
                                  }
                                ],
                                "minItems": 1,
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "publisherUrl": {
                                      "type": "string"
                                    },
                                    "catalogUrl": {
                                      "type": "string"
                                    },
                                    "cardUrl": {
                                      "type": "string"
                                    },
                                    "association": {
                                      "type": "string",
                                      "enum": [
                                        "CardOrigin",
                                        "Website",
                                        "CardLink"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "publisherUrl",
                                    "catalogUrl",
                                    "cardUrl",
                                    "association"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "checkedAt": {
                                "type": "number"
                              },
                              "validators": {
                                "type": "object",
                                "properties": {
                                  "etag": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "lastModified": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "cardUrl",
                              "card",
                              "evidence",
                              "checkedAt",
                              "validators"
                            ],
                            "additionalProperties": false
                          },
                          "sources": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "url": {
                                  "type": "string"
                                },
                                "simulated": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "url",
                                "simulated"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "matches": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "name",
                                "description",
                                "publisher"
                              ]
                            }
                          },
                          "check": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Pending"
                                    ]
                                  }
                                },
                                "required": [
                                  "_tag"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Indexed"
                                    ]
                                  },
                                  "attemptedAt": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "attemptedAt"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Excluded"
                                    ]
                                  },
                                  "attemptedAt": {
                                    "type": "number"
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "attemptedAt",
                                  "reason"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Withdrawn"
                                    ]
                                  },
                                  "attemptedAt": {
                                    "type": "number"
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "attemptedAt",
                                  "reason"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Unconfirmed"
                                    ]
                                  },
                                  "attemptedAt": {
                                    "type": "number"
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "attemptedAt",
                                  "reason"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Failed"
                                    ]
                                  },
                                  "attemptedAt": {
                                    "type": "number"
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "attemptedAt",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "restriction": {
                            "type": "object",
                            "properties": {
                              "cardUrl": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string",
                                "minLength": 1
                              },
                              "appealUrl": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "cardUrl",
                              "reason",
                              "appealUrl"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "entry",
                          "sources",
                          "matches"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "minLength": 1
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "source",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "apps",
                    "nextCursor",
                    "issues"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "IndexInputInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexInputInvalidEncoded"
                }
              }
            }
          },
          "403": {
            "description": "IndexRestricted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexRestrictedEncoded"
                }
              }
            }
          },
          "404": {
            "description": "IndexNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexNotFoundEncoded"
                }
              }
            }
          },
          "503": {
            "description": "IndexUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexUnavailableEncoded"
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-index/app": {
      "get": {
        "tags": [
          "App Index"
        ],
        "operationId": "appIndex.getApp",
        "parameters": [
          {
            "name": "cardUrl",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": false
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entry": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "$schema": {
                              "type": "string",
                              "enum": [
                                "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 200
                            },
                            "version": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "websiteUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "repository": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string"
                                    },
                                    "source": {
                                      "type": "string"
                                    },
                                    "subfolder": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "id": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "source"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "icons": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "src": {
                                        "type": "string"
                                      },
                                      "mimeType": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "sizes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "theme": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "light",
                                              "dark"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "src"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "remotes": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "streamable-http",
                                          "sse"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "headers": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "variables": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "supportedProtocolVersions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "_meta": {
                              "anyOf": [
                                {
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "$schema",
                            "name",
                            "version",
                            "description"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "evidence": {
                          "type": "array",
                          "prefixItems": [
                            {
                              "type": "object",
                              "properties": {
                                "publisherUrl": {
                                  "type": "string"
                                },
                                "catalogUrl": {
                                  "type": "string"
                                },
                                "cardUrl": {
                                  "type": "string"
                                },
                                "association": {
                                  "type": "string",
                                  "enum": [
                                    "CardOrigin",
                                    "Website",
                                    "CardLink"
                                  ]
                                }
                              },
                              "required": [
                                "publisherUrl",
                                "catalogUrl",
                                "cardUrl",
                                "association"
                              ],
                              "additionalProperties": false
                            }
                          ],
                          "minItems": 1,
                          "items": {
                            "type": "object",
                            "properties": {
                              "publisherUrl": {
                                "type": "string"
                              },
                              "catalogUrl": {
                                "type": "string"
                              },
                              "cardUrl": {
                                "type": "string"
                              },
                              "association": {
                                "type": "string",
                                "enum": [
                                  "CardOrigin",
                                  "Website",
                                  "CardLink"
                                ]
                              }
                            },
                            "required": [
                              "publisherUrl",
                              "catalogUrl",
                              "cardUrl",
                              "association"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "checkedAt": {
                          "type": "number"
                        },
                        "validators": {
                          "type": "object",
                          "properties": {
                            "etag": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastModified": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "cardUrl",
                        "card",
                        "evidence",
                        "checkedAt",
                        "validators"
                      ],
                      "additionalProperties": false
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "url": {
                            "type": "string"
                          },
                          "simulated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "url",
                          "simulated"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "matches": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "name",
                          "description",
                          "publisher"
                        ]
                      }
                    },
                    "check": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Pending"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Indexed"
                              ]
                            },
                            "attemptedAt": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "_tag",
                            "attemptedAt"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Excluded"
                              ]
                            },
                            "attemptedAt": {
                              "type": "number"
                            },
                            "reason": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "attemptedAt",
                            "reason"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Withdrawn"
                              ]
                            },
                            "attemptedAt": {
                              "type": "number"
                            },
                            "reason": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "attemptedAt",
                            "reason"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Unconfirmed"
                              ]
                            },
                            "attemptedAt": {
                              "type": "number"
                            },
                            "reason": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "attemptedAt",
                            "reason"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Failed"
                              ]
                            },
                            "attemptedAt": {
                              "type": "number"
                            },
                            "reason": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "attemptedAt",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "restriction": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "appealUrl": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "cardUrl",
                        "reason",
                        "appealUrl"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "entry",
                    "sources",
                    "matches"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "IndexInputInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexInputInvalidEncoded"
                }
              }
            }
          },
          "403": {
            "description": "IndexRestricted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexRestrictedEncoded"
                }
              }
            }
          },
          "404": {
            "description": "IndexNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexNotFoundEncoded"
                }
              }
            }
          },
          "503": {
            "description": "IndexUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexUnavailableEncoded"
                }
              }
            }
          }
        }
      }
    },
    "/v1/apps/client-metadata": {
      "get": {
        "tags": [
          "App authorization callbacks"
        ],
        "operationId": "appAuthorizationPublic.appClientMetadata",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "client_id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "client_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "redirect_uris": {
                      "type": "array",
                      "prefixItems": [
                        {
                          "type": "string"
                        }
                      ],
                      "minItems": 1,
                      "items": {
                        "type": "string"
                      }
                    },
                    "token_endpoint_auth_method": {
                      "type": "string",
                      "enum": [
                        "none"
                      ]
                    },
                    "grant_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "response_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "client_id",
                    "redirect_uris",
                    "token_endpoint_auth_method",
                    "grant_types",
                    "response_types"
                  ],
                  "allOf": [
                    {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/auth/apps/callback": {
      "get": {
        "tags": [
          "App authorization callbacks"
        ],
        "operationId": "appAuthorizationPublic.appAuthorizationCallback",
        "parameters": [],
        "security": [],
        "responses": {
          "303": {
            "description": "<No Content>"
          },
          "400": {
            "description": "ExperienceInputInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppRestrictedEncoded"
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid | AppAuthorizationFailed",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AppAuthorizationFailedEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AppAuthorizationUnavailable | ExperienceStorageUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppAuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{connectionId}/authorization": {
      "post": {
        "tags": [
          "App authorization"
        ],
        "operationId": "appAuthorization.beginAppAuthorization",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "_tag": {
                          "type": "string",
                          "enum": [
                            "AuthorizationStarted"
                          ]
                        },
                        "flowId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "authorizationUrl": {
                          "type": "string"
                        },
                        "issuer": {
                          "type": "string"
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "_tag",
                        "flowId",
                        "authorizationUrl",
                        "issuer",
                        "scopes"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_tag": {
                          "type": "string",
                          "enum": [
                            "IssuerSelectionRequired"
                          ]
                        },
                        "issuers": {
                          "type": "array",
                          "prefixItems": [
                            {
                              "type": "string"
                            }
                          ],
                          "minItems": 1,
                          "items": {
                            "type": "string"
                          }
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "_tag",
                        "issuers",
                        "scopes"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_tag": {
                          "type": "string",
                          "enum": [
                            "AuthorizationNotRequired"
                          ]
                        }
                      },
                      "required": [
                        "_tag"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid | AppAuthorizationFailed",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AppAuthorizationFailedEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AppAuthorizationUnavailable | ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppAuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "maxItems": 50
                  },
                  "issuer": {
                    "type": "string"
                  },
                  "returnTo": {
                    "type": "string",
                    "maxLength": 4096
                  }
                },
                "required": [
                  "revision",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": [
          "App authorization"
        ],
        "operationId": "appAuthorization.revokeAppAuthorization",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "_tag": {
                          "type": "string",
                          "enum": [
                            "Revoked"
                          ]
                        }
                      },
                      "required": [
                        "_tag"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_tag": {
                          "type": "string",
                          "enum": [
                            "LocalOnly"
                          ]
                        }
                      },
                      "required": [
                        "_tag"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid | AppAuthorizationFailed",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AppAuthorizationFailedEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AppAuthorizationUnavailable | ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppAuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-authorizations/{flowId}": {
      "get": {
        "tags": [
          "App authorization"
        ],
        "operationId": "appAuthorization.getAppAuthorization",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "flowId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "connectionId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "returnTo": {
                      "type": "string",
                      "maxLength": 4096
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "issuer": {
                      "type": "string"
                    },
                    "resource": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Waiting",
                        "Received",
                        "Processing",
                        "Succeeded",
                        "Cancelled",
                        "Failed"
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "flowId",
                    "connectionId",
                    "returnTo",
                    "expiresAt",
                    "issuer",
                    "resource",
                    "scopes",
                    "status",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid | AppAuthorizationFailed",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AppAuthorizationFailedEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AppAuthorizationUnavailable | ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppAuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-authorizations/{flowId}/complete": {
      "post": {
        "tags": [
          "App authorization"
        ],
        "operationId": "appAuthorization.completeAppAuthorization",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "flowId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "connectionId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "returnTo": {
                      "type": "string",
                      "maxLength": 4096
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "issuer": {
                      "type": "string"
                    },
                    "resource": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Waiting",
                        "Received",
                        "Processing",
                        "Succeeded",
                        "Cancelled",
                        "Failed"
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "flowId",
                    "connectionId",
                    "returnTo",
                    "expiresAt",
                    "issuer",
                    "resource",
                    "scopes",
                    "status",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid | AppAuthorizationFailed",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AppAuthorizationFailedEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AppAuthorizationUnavailable | ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppAuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/apps/discover": {
      "post": {
        "tags": [
          "App discovery"
        ],
        "operationId": "apps.discoverApp",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "_tag": {
                          "type": "string",
                          "enum": [
                            "Single"
                          ]
                        },
                        "candidate": {
                          "type": "object",
                          "properties": {
                            "cardUrl": {
                              "type": "string"
                            },
                            "card": {
                              "type": "object",
                              "properties": {
                                "$schema": {
                                  "type": "string",
                                  "enum": [
                                    "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 2,
                                  "maxLength": 200
                                },
                                "version": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "description": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                "title": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 100
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "websiteUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "repository": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "url": {
                                          "type": "string"
                                        },
                                        "source": {
                                          "type": "string"
                                        },
                                        "subfolder": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "id": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "url",
                                        "source"
                                      ],
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {}
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "icons": {
                                  "anyOf": [
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "src": {
                                            "type": "string"
                                          },
                                          "mimeType": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "sizes": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "theme": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "light",
                                                  "dark"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "src"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "remotes": {
                                  "anyOf": [
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "streamable-http",
                                              "sse"
                                            ]
                                          },
                                          "url": {
                                            "type": "string"
                                          },
                                          "headers": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "description": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isRequired": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isSecret": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "format": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "string",
                                                            "number",
                                                            "boolean",
                                                            "filepath"
                                                          ]
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "default": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "placeholder": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "choices": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "variables": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {
                                                            "type": "object",
                                                            "properties": {
                                                              "description": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isRequired": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isSecret": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "format": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "string",
                                                                      "number",
                                                                      "boolean",
                                                                      "filepath"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "default": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "placeholder": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "choices": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "variables": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {
                                                  "type": "object",
                                                  "properties": {
                                                    "description": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isRequired": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isSecret": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "format": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "string",
                                                            "number",
                                                            "boolean",
                                                            "filepath"
                                                          ]
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "default": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "placeholder": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "choices": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "supportedProtocolVersions": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "url"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "_meta": {
                                  "anyOf": [
                                    {
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "$schema",
                                "name",
                                "version",
                                "description"
                              ],
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              ]
                            },
                            "endpoints": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "index": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "remote": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "streamable-http",
                                          "sse"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "headers": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "variables": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "object",
                                              "properties": {
                                                "description": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isRequired": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "isSecret": {
                                                  "anyOf": [
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "format": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "string",
                                                        "number",
                                                        "boolean",
                                                        "filepath"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "default": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "placeholder": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "choices": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "supportedProtocolVersions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  },
                                  "requirements": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "key": {
                                          "type": "string"
                                        },
                                        "description": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "isSecret": {
                                          "type": "boolean"
                                        },
                                        "format": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "choices": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "key",
                                        "isSecret"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "index",
                                  "remote",
                                  "requirements"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "input",
                                      "page",
                                      "catalog",
                                      "card",
                                      "endpoint",
                                      "manual"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "originalInput": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "role",
                                  "url"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "cardUrl",
                            "card",
                            "endpoints",
                            "sources"
                          ],
                          "additionalProperties": false
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string"
                              },
                              "fieldPath": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url",
                              "reason"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "_tag",
                        "candidate",
                        "issues"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_tag": {
                          "type": "string",
                          "enum": [
                            "Multiple"
                          ]
                        },
                        "candidates": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "cardUrl": {
                                "type": "string"
                              },
                              "card": {
                                "type": "object",
                                "properties": {
                                  "$schema": {
                                    "type": "string",
                                    "enum": [
                                      "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                    ]
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 2,
                                    "maxLength": 200
                                  },
                                  "version": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "description": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 100
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "websiteUrl": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "repository": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          },
                                          "source": {
                                            "type": "string"
                                          },
                                          "subfolder": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "id": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "url",
                                          "source"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "icons": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "src": {
                                              "type": "string"
                                            },
                                            "mimeType": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "sizes": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "theme": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "light",
                                                    "dark"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "src"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "remotes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "streamable-http",
                                                "sse"
                                              ]
                                            },
                                            "url": {
                                              "type": "string"
                                            },
                                            "headers": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "name": {
                                                        "type": "string"
                                                      },
                                                      "variables": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isRequired": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isSecret": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "format": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "string",
                                                                        "number",
                                                                        "boolean",
                                                                        "filepath"
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "default": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "placeholder": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "value": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "choices": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "allOf": [
                                                                {
                                                                  "type": "object",
                                                                  "additionalProperties": {}
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "name"
                                                    ],
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "supportedProtocolVersions": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "_meta": {
                                    "anyOf": [
                                      {
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "$schema",
                                  "name",
                                  "version",
                                  "description"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "endpoints": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "index": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "remote": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "streamable-http",
                                            "sse"
                                          ]
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "headers": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "description": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isRequired": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isSecret": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "format": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "string",
                                                          "number",
                                                          "boolean",
                                                          "filepath"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "default": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "placeholder": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "choices": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "variables": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "object",
                                                          "properties": {
                                                            "description": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isRequired": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isSecret": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "boolean"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "format": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "string",
                                                                    "number",
                                                                    "boolean",
                                                                    "filepath"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "default": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "placeholder": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "value": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "choices": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {}
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "variables": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "description": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isRequired": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "isSecret": {
                                                    "anyOf": [
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "format": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "string",
                                                          "number",
                                                          "boolean",
                                                          "filepath"
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "default": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "placeholder": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "choices": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "supportedProtocolVersions": {
                                          "anyOf": [
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "url"
                                      ],
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {}
                                        }
                                      ]
                                    },
                                    "requirements": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "isSecret": {
                                            "type": "boolean"
                                          },
                                          "format": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "choices": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "isSecret"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "index",
                                    "remote",
                                    "requirements"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "sources": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "input",
                                        "page",
                                        "catalog",
                                        "card",
                                        "endpoint",
                                        "manual"
                                      ]
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "originalInput": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "url"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "cardUrl",
                              "card",
                              "endpoints",
                              "sources"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 2
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "string"
                              },
                              "fieldPath": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url",
                              "reason"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "_tag",
                        "candidates",
                        "issues"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "BadRequest | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Finds Apps at a domain or HTTPS link. Returns OpenBot App Protocol candidates, configuration requirements and provenance (where each candidate came from). It does not add a connection, authorize an account or index a service.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "input"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/sessions/{sessionId}/versions": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.sessionVersions",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "schemaVersion": {
                        "type": "string"
                      },
                      "parents": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": false
                          },
                          {
                            "type": "array",
                            "prefixItems": [
                              {
                                "type": "string"
                              }
                            ],
                            "maxItems": 1,
                            "minItems": 1
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "schemaVersion",
                      "parents"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.createSession",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound | AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict | AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Creates an idle Session for an Agent without calling a model. Without `agent`, the Main Agent of the caller works in it. The latest response is null.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agent": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "title": {
                    "type": "string"
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "default",
                          "plan"
                        ]
                      },
                      "model": {
                        "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.listSessions",
        "parameters": [
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          },
          {
            "name": "agent",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": false
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "direct",
                "delegated",
                "review"
              ]
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "session": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "head": {
                            "type": "string"
                          },
                          "metadata": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string"
                              },
                              "archived": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "title",
                              "archived"
                            ],
                            "additionalProperties": false
                          },
                          "settings": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "default",
                                  "plan"
                                ]
                              },
                              "model": {
                                "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                              }
                            },
                            "required": [
                              "mode"
                            ],
                            "additionalProperties": false
                          },
                          "pending": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "content": {
                                  "$ref": "#/components/schemas/PromptEncoded"
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "message",
                                    "steer",
                                    "action"
                                  ]
                                },
                                "turn": {
                                  "type": "string"
                                },
                                "action": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "arguments": {
                                      "type": "object"
                                    },
                                    "source": {
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "arguments"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "content",
                                "kind"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "turns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "session": {
                                  "type": "string"
                                },
                                "settings": {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "plan"
                                      ]
                                    },
                                    "model": {
                                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                    }
                                  },
                                  "required": [
                                    "mode"
                                  ],
                                  "additionalProperties": false
                                },
                                "action": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "arguments": {
                                      "type": "object"
                                    },
                                    "source": {
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "arguments"
                                  ],
                                  "additionalProperties": false
                                },
                                "activeAction": {
                                  "type": "object",
                                  "properties": {
                                    "item": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "arguments": {
                                          "type": "object"
                                        },
                                        "source": {
                                          "type": "object"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "arguments"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "item",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                },
                                "status": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Running"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Waiting"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Completed"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Failed"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "model_error",
                                            "internal_error"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "message",
                                        "code"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Interrupted"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "steps": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "usage": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                  }
                                },
                                "input": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "start": {
                                  "type": "string"
                                },
                                "end": {
                                  "type": "string"
                                },
                                "startedAt": {
                                  "type": "number"
                                },
                                "completedAt": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "id",
                                "session",
                                "settings",
                                "status",
                                "steps",
                                "input",
                                "items",
                                "start",
                                "startedAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "inheritedTurns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "session": {
                                  "type": "string"
                                },
                                "settings": {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "plan"
                                      ]
                                    },
                                    "model": {
                                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                    }
                                  },
                                  "required": [
                                    "mode"
                                  ],
                                  "additionalProperties": false
                                },
                                "action": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "arguments": {
                                      "type": "object"
                                    },
                                    "source": {
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "arguments"
                                  ],
                                  "additionalProperties": false
                                },
                                "activeAction": {
                                  "type": "object",
                                  "properties": {
                                    "item": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "arguments": {
                                          "type": "object"
                                        },
                                        "source": {
                                          "type": "object"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "arguments"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "item",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                },
                                "status": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Running"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Waiting"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Completed"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Failed"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "model_error",
                                            "internal_error"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "message",
                                        "code"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Interrupted"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "steps": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "usage": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                  }
                                },
                                "input": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "start": {
                                  "type": "string"
                                },
                                "end": {
                                  "type": "string"
                                },
                                "startedAt": {
                                  "type": "number"
                                },
                                "completedAt": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "id",
                                "session",
                                "settings",
                                "status",
                                "steps",
                                "input",
                                "items",
                                "start",
                                "startedAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "business": {
                            "type": "object"
                          },
                          "forkedFrom": {
                            "type": "object",
                            "properties": {
                              "session": {
                                "type": "string"
                              },
                              "version": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "session",
                              "version"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "revision",
                          "head",
                          "metadata",
                          "settings",
                          "pending",
                          "turns",
                          "inheritedTurns",
                          "business"
                        ],
                        "additionalProperties": false
                      },
                      "agent": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "direct",
                          "delegated",
                          "review"
                        ]
                      },
                      "parent": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "session": {
                                "type": "string"
                              },
                              "turn": {
                                "type": "string"
                              },
                              "toolCallId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "session",
                              "turn",
                              "toolCallId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "Idle",
                          "Running",
                          "Waiting",
                          "Completed",
                          "Failed",
                          "Interrupted"
                        ]
                      },
                      "turn": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "response": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "in_progress",
                                  "completed",
                                  "incomplete",
                                  "failed",
                                  "cancelled"
                                ]
                              },
                              "version": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "created_at",
                              "status",
                              "version"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "activity": {
                        "type": "string",
                        "enum": [
                          "active",
                          "inactive",
                          "historical"
                        ]
                      }
                    },
                    "required": [
                      "session",
                      "agent",
                      "kind",
                      "parent",
                      "status",
                      "turn",
                      "response",
                      "activity"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/turns": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.startTurn",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "event": {
                      "type": "string",
                      "enum": [
                        "response.created",
                        "response.in_progress",
                        "response.output_item.added",
                        "response.content_part.added",
                        "response.output_text.delta",
                        "response.output_text.done",
                        "response.content_part.done",
                        "response.output_item.done",
                        "response.completed",
                        "response.incomplete",
                        "response.failed",
                        "response.cancelled"
                      ]
                    },
                    "data": {
                      "type": "string",
                      "contentMediaType": "application/json"
                    }
                  },
                  "required": [
                    "event",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "x-effect-stream": {
                  "encoding": "sse",
                  "causeSchema": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Fail"
                              ]
                            },
                            "error": {
                              "not": {}
                            }
                          },
                          "required": [
                            "_tag",
                            "error"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Die"
                              ]
                            },
                            "defect": {}
                          },
                          "required": [
                            "_tag",
                            "defect"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Interrupt"
                              ]
                            },
                            "fiberId": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "_tag",
                            "fiberId"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "errorSchema": {
                    "not": {}
                  },
                  "failureEvent": "effect/http-api/stream/failure"
                }
              }
            }
          },
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "usage": {
                      "type": "object",
                      "properties": {
                        "inputTokens": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "uncached": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "cacheRead": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "cacheWrite": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "additionalProperties": false
                        },
                        "outputTokens": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "text": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "reasoning": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "inputTokens",
                        "outputTokens"
                      ],
                      "additionalProperties": false
                    },
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "response"
                      ]
                    },
                    "created_at": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "session": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "background": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "in_progress",
                        "completed",
                        "incomplete",
                        "failed",
                        "cancelled"
                      ]
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "message"
                            ]
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "assistant"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "in_progress",
                              "completed",
                              "incomplete"
                            ]
                          },
                          "content": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "output_text"
                                  ]
                                },
                                "text": {
                                  "type": "string"
                                },
                                "annotations": {
                                  "type": "array",
                                  "items": false
                                }
                              },
                              "required": [
                                "type",
                                "text",
                                "annotations"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "role",
                          "status",
                          "content"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "model_error",
                                "internal_error"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "incomplete_details": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "reason": {
                              "type": "string",
                              "enum": [
                                "max_output_tokens",
                                "content_filter",
                                "other"
                              ]
                            }
                          },
                          "required": [
                            "reason"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "created_at",
                    "session",
                    "version",
                    "background",
                    "status",
                    "output",
                    "error",
                    "incomplete_details"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | SessionExecutionUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionExecutionUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Accepts text input and returns an in_progress response. The host scope owns the execution. Read the Session's response for results. Unsupported fields or input types return 400.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "overrides": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "default",
                          "plan"
                        ]
                      },
                      "model": {
                        "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                      }
                    },
                    "additionalProperties": false
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "message"
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "role",
                            "content"
                          ],
                          "additionalProperties": false
                        },
                        "minItems": 1
                      }
                    ]
                  },
                  "background": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "stream": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "expected",
                  "input"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.sessionTurns",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "session": {
                            "type": "string"
                          },
                          "settings": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "default",
                                  "plan"
                                ]
                              },
                              "model": {
                                "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                              }
                            },
                            "required": [
                              "mode"
                            ],
                            "additionalProperties": false
                          },
                          "action": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "arguments": {
                                "type": "object"
                              },
                              "source": {
                                "type": "object"
                              }
                            },
                            "required": [
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": false
                          },
                          "activeAction": {
                            "type": "object",
                            "properties": {
                              "item": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "item",
                              "action"
                            ],
                            "additionalProperties": false
                          },
                          "status": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Running"
                                    ]
                                  }
                                },
                                "required": [
                                  "_tag"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Waiting"
                                    ]
                                  },
                                  "result": {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "string"
                                      },
                                      "finishReason": {
                                        "type": "string",
                                        "enum": [
                                          "stop",
                                          "length",
                                          "content-filter",
                                          "tool-calls",
                                          "error",
                                          "pause",
                                          "other",
                                          "unknown"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text",
                                      "finishReason"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "result"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Completed"
                                    ]
                                  },
                                  "result": {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "string"
                                      },
                                      "finishReason": {
                                        "type": "string",
                                        "enum": [
                                          "stop",
                                          "length",
                                          "content-filter",
                                          "tool-calls",
                                          "error",
                                          "pause",
                                          "other",
                                          "unknown"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text",
                                      "finishReason"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "result"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Failed"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "model_error",
                                      "internal_error"
                                    ]
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "message",
                                  "code"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Interrupted"
                                    ]
                                  }
                                },
                                "required": [
                                  "_tag"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "steps": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "usage": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                            }
                          },
                          "input": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "start": {
                            "type": "string"
                          },
                          "end": {
                            "type": "string"
                          },
                          "startedAt": {
                            "type": "number"
                          },
                          "completedAt": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "session",
                          "settings",
                          "status",
                          "steps",
                          "input",
                          "items",
                          "start",
                          "startedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.getSession",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Returns the current core view and the latest response, with its status, output and error. Reading never starts execution."
      },
      "patch": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.updateSession",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "title": {
                    "type": "string"
                  },
                  "archived": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "expected"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.deleteSession",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/mode": {
      "put": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.selectSessionMode",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "default",
                      "plan"
                    ]
                  }
                },
                "required": [
                  "expected",
                  "mode"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/sessions/{sessionId}/models": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.sessionModels",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "selected": {
                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                    },
                    "providers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "endpoint": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Config.ModelEncoded"
                      }
                    }
                  },
                  "required": [
                    "providers",
                    "models"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/model": {
      "put": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.selectSessionModel",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | SessionExecutionUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionExecutionUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Checks and saves the Session model selection. The Session revision guards against concurrent changes.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "selection": {
                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                  }
                },
                "required": [
                  "expected",
                  "selection"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/sessions/{sessionId}/memory": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.sessionMemory",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "content": {
                            "type": "string",
                            "minLength": 1
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "fact",
                              "decision",
                              "preference",
                              "procedure",
                              "hypothesis"
                            ]
                          },
                          "sources": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "updatedAt": {
                            "type": "number"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "retracted"
                            ]
                          }
                        },
                        "required": [
                          "key",
                          "content",
                          "kind",
                          "sources",
                          "updatedAt",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "processed": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "use": {
                          "type": "boolean"
                        },
                        "generate": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "use",
                        "generate"
                      ],
                      "additionalProperties": false
                    },
                    "overrides": {
                      "type": "object",
                      "properties": {
                        "use": {
                          "type": "boolean"
                        },
                        "generate": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "entries",
                    "processed",
                    "settings",
                    "overrides"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.updateSessionMemory",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "string"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "command": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Remember"
                                ]
                              },
                              "key": {
                                "type": "string",
                                "minLength": 1
                              },
                              "content": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "fact",
                                  "decision",
                                  "preference",
                                  "procedure",
                                  "hypothesis"
                                ]
                              }
                            },
                            "required": [
                              "_tag",
                              "key",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Forget"
                                ]
                              },
                              "key": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "_tag",
                              "key"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "_tag": {
                            "type": "string",
                            "enum": [
                              "Configure"
                            ]
                          },
                          "use": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "generate": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "_tag"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "_tag": {
                            "type": "string",
                            "enum": [
                              "Refresh"
                            ]
                          }
                        },
                        "required": [
                          "_tag"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "expected",
                  "revision",
                  "command"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/sessions/{sessionId}/fork": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.forkSession",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "default",
                          "plan"
                        ]
                      },
                      "model": {
                        "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/sessions/{sessionId}/history": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.sessionHistory",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "schemaVersion": {
                          "type": "string"
                        },
                        "parents": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": false
                            },
                            {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "string"
                                }
                              ],
                              "maxItems": 1,
                              "minItems": 1
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "schemaVersion",
                        "parents"
                      ],
                      "additionalProperties": false
                    },
                    "value": {
                      "type": "object",
                      "properties": {
                        "conversation": {
                          "type": "object",
                          "properties": {
                            "history": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "content": {
                                    "$ref": "#/components/schemas/PromptEncoded"
                                  },
                                  "origin": {
                                    "type": "object",
                                    "properties": {
                                      "session": {
                                        "type": "string"
                                      },
                                      "turn": {
                                        "type": "string"
                                      },
                                      "step": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      }
                                    },
                                    "required": [
                                      "session",
                                      "turn",
                                      "step"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "id",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "context": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Prompt"
                                      ]
                                    },
                                    "prompt": {
                                      "$ref": "#/components/schemas/PromptEncoded"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "prompt"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Native"
                                      ]
                                    },
                                    "provider": {
                                      "type": "string"
                                    },
                                    "model": {
                                      "type": "string"
                                    },
                                    "items": {
                                      "type": "array"
                                    },
                                    "prompt": {
                                      "$ref": "#/components/schemas/PromptEncoded"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "provider",
                                    "model",
                                    "items",
                                    "prompt"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "closed": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "history",
                            "context",
                            "closed"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "conversation"
                      ],
                      "allOf": [
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    }
                  },
                  "required": [
                    "version",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/record": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.exportSession",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "formatVersion": {
                      "type": "number",
                      "enum": [
                        3
                      ]
                    },
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "versions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "schemaVersion": {
                            "type": "string"
                          },
                          "parents": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": false
                              },
                              {
                                "type": "array",
                                "prefixItems": [
                                  {
                                    "type": "string"
                                  }
                                ],
                                "maxItems": 1,
                                "minItems": 1
                              }
                            ]
                          },
                          "snapshotFormatVersion": {
                            "type": "number",
                            "enum": [
                              2
                            ]
                          },
                          "value": {
                            "type": "object"
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "message": {
                                  "type": "string"
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "message",
                                "content"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "schemaVersion",
                          "parents",
                          "snapshotFormatVersion",
                          "value",
                          "history"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "content": {}
                        },
                        "required": [
                          "id",
                          "message",
                          "content"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "formatVersion",
                    "session",
                    "versions",
                    "messages"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.restoreSession",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "record": {
                    "type": "object",
                    "properties": {
                      "formatVersion": {
                        "type": "number",
                        "enum": [
                          3
                        ]
                      },
                      "session": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "head": {
                            "type": "string"
                          },
                          "metadata": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string"
                              },
                              "archived": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "title",
                              "archived"
                            ],
                            "additionalProperties": false
                          },
                          "settings": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "default",
                                  "plan"
                                ]
                              },
                              "model": {
                                "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                              }
                            },
                            "required": [
                              "mode"
                            ],
                            "additionalProperties": false
                          },
                          "pending": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "content": {
                                  "$ref": "#/components/schemas/PromptEncoded"
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "message",
                                    "steer",
                                    "action"
                                  ]
                                },
                                "turn": {
                                  "type": "string"
                                },
                                "action": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "arguments": {
                                      "type": "object"
                                    },
                                    "source": {
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "arguments"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "content",
                                "kind"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "turns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "session": {
                                  "type": "string"
                                },
                                "settings": {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "plan"
                                      ]
                                    },
                                    "model": {
                                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                    }
                                  },
                                  "required": [
                                    "mode"
                                  ],
                                  "additionalProperties": false
                                },
                                "action": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "arguments": {
                                      "type": "object"
                                    },
                                    "source": {
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "arguments"
                                  ],
                                  "additionalProperties": false
                                },
                                "activeAction": {
                                  "type": "object",
                                  "properties": {
                                    "item": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "arguments": {
                                          "type": "object"
                                        },
                                        "source": {
                                          "type": "object"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "arguments"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "item",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                },
                                "status": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Running"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Waiting"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Completed"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Failed"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "model_error",
                                            "internal_error"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "message",
                                        "code"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Interrupted"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "steps": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "usage": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                  }
                                },
                                "input": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "start": {
                                  "type": "string"
                                },
                                "end": {
                                  "type": "string"
                                },
                                "startedAt": {
                                  "type": "number"
                                },
                                "completedAt": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "id",
                                "session",
                                "settings",
                                "status",
                                "steps",
                                "input",
                                "items",
                                "start",
                                "startedAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "inheritedTurns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "session": {
                                  "type": "string"
                                },
                                "settings": {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "plan"
                                      ]
                                    },
                                    "model": {
                                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                    }
                                  },
                                  "required": [
                                    "mode"
                                  ],
                                  "additionalProperties": false
                                },
                                "action": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "arguments": {
                                      "type": "object"
                                    },
                                    "source": {
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "arguments"
                                  ],
                                  "additionalProperties": false
                                },
                                "activeAction": {
                                  "type": "object",
                                  "properties": {
                                    "item": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "arguments": {
                                          "type": "object"
                                        },
                                        "source": {
                                          "type": "object"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "arguments"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "item",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                },
                                "status": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Running"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Waiting"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Completed"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Failed"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "model_error",
                                            "internal_error"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "message",
                                        "code"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Interrupted"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "steps": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "usage": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                  }
                                },
                                "input": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "start": {
                                  "type": "string"
                                },
                                "end": {
                                  "type": "string"
                                },
                                "startedAt": {
                                  "type": "number"
                                },
                                "completedAt": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "id",
                                "session",
                                "settings",
                                "status",
                                "steps",
                                "input",
                                "items",
                                "start",
                                "startedAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "business": {
                            "type": "object"
                          },
                          "forkedFrom": {
                            "type": "object",
                            "properties": {
                              "session": {
                                "type": "string"
                              },
                              "version": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "session",
                              "version"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "revision",
                          "head",
                          "metadata",
                          "settings",
                          "pending",
                          "turns",
                          "inheritedTurns",
                          "business"
                        ],
                        "additionalProperties": false
                      },
                      "versions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            },
                            "snapshotFormatVersion": {
                              "type": "number",
                              "enum": [
                                2
                              ]
                            },
                            "value": {
                              "type": "object"
                            },
                            "history": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "message": {
                                    "type": "string"
                                  },
                                  "content": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "message",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents",
                            "snapshotFormatVersion",
                            "value",
                            "history"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "messages": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "content": {}
                          },
                          "required": [
                            "id",
                            "message",
                            "content"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "formatVersion",
                      "session",
                      "versions",
                      "messages"
                    ],
                    "additionalProperties": false
                  },
                  "expected": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "head": {
                            "type": "string"
                          },
                          "metadata": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string"
                              },
                              "archived": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "title",
                              "archived"
                            ],
                            "additionalProperties": false
                          },
                          "settings": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "default",
                                  "plan"
                                ]
                              },
                              "model": {
                                "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                              }
                            },
                            "required": [
                              "mode"
                            ],
                            "additionalProperties": false
                          },
                          "pending": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "content": {
                                  "$ref": "#/components/schemas/PromptEncoded"
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "message",
                                    "steer",
                                    "action"
                                  ]
                                },
                                "turn": {
                                  "type": "string"
                                },
                                "action": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "arguments": {
                                      "type": "object"
                                    },
                                    "source": {
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "arguments"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "content",
                                "kind"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "turns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "session": {
                                  "type": "string"
                                },
                                "settings": {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "plan"
                                      ]
                                    },
                                    "model": {
                                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                    }
                                  },
                                  "required": [
                                    "mode"
                                  ],
                                  "additionalProperties": false
                                },
                                "action": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "arguments": {
                                      "type": "object"
                                    },
                                    "source": {
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "arguments"
                                  ],
                                  "additionalProperties": false
                                },
                                "activeAction": {
                                  "type": "object",
                                  "properties": {
                                    "item": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "arguments": {
                                          "type": "object"
                                        },
                                        "source": {
                                          "type": "object"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "arguments"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "item",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                },
                                "status": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Running"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Waiting"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Completed"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Failed"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "model_error",
                                            "internal_error"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "message",
                                        "code"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Interrupted"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "steps": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "usage": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                  }
                                },
                                "input": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "start": {
                                  "type": "string"
                                },
                                "end": {
                                  "type": "string"
                                },
                                "startedAt": {
                                  "type": "number"
                                },
                                "completedAt": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "id",
                                "session",
                                "settings",
                                "status",
                                "steps",
                                "input",
                                "items",
                                "start",
                                "startedAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "inheritedTurns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "session": {
                                  "type": "string"
                                },
                                "settings": {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "plan"
                                      ]
                                    },
                                    "model": {
                                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                    }
                                  },
                                  "required": [
                                    "mode"
                                  ],
                                  "additionalProperties": false
                                },
                                "action": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "arguments": {
                                      "type": "object"
                                    },
                                    "source": {
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "arguments"
                                  ],
                                  "additionalProperties": false
                                },
                                "activeAction": {
                                  "type": "object",
                                  "properties": {
                                    "item": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "arguments": {
                                          "type": "object"
                                        },
                                        "source": {
                                          "type": "object"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "arguments"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "item",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                },
                                "status": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Running"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Waiting"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Completed"
                                          ]
                                        },
                                        "result": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "finishReason": {
                                              "type": "string",
                                              "enum": [
                                                "stop",
                                                "length",
                                                "content-filter",
                                                "tool-calls",
                                                "error",
                                                "pause",
                                                "other",
                                                "unknown"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "finishReason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Failed"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "model_error",
                                            "internal_error"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "message",
                                        "code"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Interrupted"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "steps": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "usage": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                  }
                                },
                                "input": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "start": {
                                  "type": "string"
                                },
                                "end": {
                                  "type": "string"
                                },
                                "startedAt": {
                                  "type": "number"
                                },
                                "completedAt": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "id",
                                "session",
                                "settings",
                                "status",
                                "steps",
                                "input",
                                "items",
                                "start",
                                "startedAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "business": {
                            "type": "object"
                          },
                          "forkedFrom": {
                            "type": "object",
                            "properties": {
                              "session": {
                                "type": "string"
                              },
                              "version": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "session",
                              "version"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "revision",
                          "head",
                          "metadata",
                          "settings",
                          "pending",
                          "turns",
                          "inheritedTurns",
                          "business"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "record",
                  "expected"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/sessions/{sessionId}/wait": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.waitSession",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "afterActivity",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "historical"
              ]
            },
            "required": false
          },
          {
            "name": "timeoutMs",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/resume": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.resumeSession",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/settings": {
      "put": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.updateSessionSettings",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "default",
                          "plan"
                        ]
                      },
                      "model": {
                        "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                      }
                    },
                    "required": [
                      "mode"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "expected",
                  "settings"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/sessions/{sessionId}/turns/{turnId}": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.getTurn",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "name": "turnId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "turn": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "session": {
                          "type": "string"
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "action": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "arguments": {
                              "type": "object"
                            },
                            "source": {
                              "type": "object"
                            }
                          },
                          "required": [
                            "name",
                            "arguments"
                          ],
                          "additionalProperties": false
                        },
                        "activeAction": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string"
                            },
                            "action": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "arguments": {
                                  "type": "object"
                                },
                                "source": {
                                  "type": "object"
                                }
                              },
                              "required": [
                                "name",
                                "arguments"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "item",
                            "action"
                          ],
                          "additionalProperties": false
                        },
                        "status": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Running"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Waiting"
                                  ]
                                },
                                "result": {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "finishReason": {
                                      "type": "string",
                                      "enum": [
                                        "stop",
                                        "length",
                                        "content-filter",
                                        "tool-calls",
                                        "error",
                                        "pause",
                                        "other",
                                        "unknown"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "text",
                                    "finishReason"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "_tag",
                                "result"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Completed"
                                  ]
                                },
                                "result": {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "finishReason": {
                                      "type": "string",
                                      "enum": [
                                        "stop",
                                        "length",
                                        "content-filter",
                                        "tool-calls",
                                        "error",
                                        "pause",
                                        "other",
                                        "unknown"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "text",
                                    "finishReason"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "_tag",
                                "result"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Failed"
                                  ]
                                },
                                "message": {
                                  "type": "string"
                                },
                                "code": {
                                  "type": "string",
                                  "enum": [
                                    "model_error",
                                    "internal_error"
                                  ]
                                }
                              },
                              "required": [
                                "_tag",
                                "message",
                                "code"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Interrupted"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "steps": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "usage": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                          }
                        },
                        "input": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        },
                        "startedAt": {
                          "type": "number"
                        },
                        "completedAt": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "session",
                        "settings",
                        "status",
                        "steps",
                        "input",
                        "items",
                        "start",
                        "startedAt"
                      ],
                      "additionalProperties": false
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "object",
                          "properties": {
                            "inputTokens": {
                              "type": "object",
                              "properties": {
                                "total": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "uncached": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "cacheRead": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "cacheWrite": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "additionalProperties": false
                            },
                            "outputTokens": {
                              "type": "object",
                              "properties": {
                                "total": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "text": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "reasoning": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "inputTokens",
                            "outputTokens"
                          ],
                          "additionalProperties": false
                        },
                        "id": {
                          "type": "string"
                        },
                        "object": {
                          "type": "string",
                          "enum": [
                            "response"
                          ]
                        },
                        "created_at": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "session": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        },
                        "background": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "in_progress",
                            "completed",
                            "incomplete",
                            "failed",
                            "cancelled"
                          ]
                        },
                        "output": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "in_progress",
                                  "completed",
                                  "incomplete"
                                ]
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "output_text"
                                      ]
                                    },
                                    "text": {
                                      "type": "string"
                                    },
                                    "annotations": {
                                      "type": "array",
                                      "items": false
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text",
                                    "annotations"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "enum": [
                                    "model_error",
                                    "internal_error"
                                  ]
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "code",
                                "message"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "incomplete_details": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "max_output_tokens",
                                    "content_filter",
                                    "other"
                                  ]
                                }
                              },
                              "required": [
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "object",
                        "created_at",
                        "session",
                        "version",
                        "background",
                        "status",
                        "output",
                        "error",
                        "incomplete_details"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "turn",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/turns/{turnId}/items": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.turnItems",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "name": "turnId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "content": {
                            "$ref": "#/components/schemas/PromptEncoded"
                          },
                          "origin": {
                            "type": "object",
                            "properties": {
                              "session": {
                                "type": "string"
                              },
                              "turn": {
                                "type": "string"
                              },
                              "step": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "session",
                              "turn",
                              "step"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "content"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/turns/{turnId}/steer": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.steerTurn",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "name": "turnId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "string"
                    },
                    "turn": {
                      "type": "string"
                    },
                    "item": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "session",
                    "turn",
                    "item",
                    "revision",
                    "version"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "message"
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "role",
                            "content"
                          ],
                          "additionalProperties": false
                        },
                        "minItems": 1
                      }
                    ]
                  }
                },
                "required": [
                  "input"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/sessions/{sessionId}/queue": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.enqueueMessage",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "string"
                    },
                    "item": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "session",
                    "item",
                    "revision"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "message"
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "role",
                            "content"
                          ],
                          "additionalProperties": false
                        },
                        "minItems": 1
                      }
                    ]
                  },
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "input"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/sessions/{sessionId}/delegations": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.sessionDelegations",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "parent": {
                        "type": "object",
                        "properties": {
                          "session": {
                            "type": "string"
                          },
                          "turn": {
                            "type": "string"
                          },
                          "toolCallId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "session",
                          "turn",
                          "toolCallId"
                        ],
                        "additionalProperties": false
                      },
                      "agent": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "child": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "session": {
                                "type": "string"
                              },
                              "turn": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "session",
                              "turn"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "authorizing",
                          "queued",
                          "running",
                          "completed",
                          "failed",
                          "cancelled"
                        ]
                      },
                      "brief": {
                        "type": "object",
                        "properties": {
                          "task": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 20000
                          },
                          "userRequest": {
                            "type": "string",
                            "maxLength": 20000
                          },
                          "context": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "references": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "session": {
                                  "type": "string"
                                },
                                "item": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "session",
                                "item"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "constraints": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "expectedOutput": {
                            "type": "string"
                          },
                          "session": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "task",
                          "userRequest",
                          "context",
                          "references",
                          "constraints",
                          "expectedOutput"
                        ],
                        "additionalProperties": false
                      },
                      "result": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "completed",
                                  "failed",
                                  "cancelled"
                                ]
                              },
                              "summary": {
                                "type": "string"
                              },
                              "artifacts": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string"
                                    },
                                    "ref": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "ref"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "openQuestions": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "child": {
                                "type": "object",
                                "properties": {
                                  "session": {
                                    "type": "string"
                                  },
                                  "turn": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "session",
                                  "turn"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "status",
                              "summary",
                              "artifacts",
                              "openQuestions",
                              "child"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "parent",
                      "agent",
                      "child",
                      "status",
                      "brief",
                      "result",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Lists the work that this Session gave to other Agents, with its status and result."
      }
    },
    "/v1/sessions/{sessionId}/turns/{turnId}/interrupt": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "operationId": "sessions.interruptTurn",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "name": "turnId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "head": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "archived": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "title",
                            "archived"
                          ],
                          "additionalProperties": false
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "default",
                                "plan"
                              ]
                            },
                            "model": {
                              "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "content": {
                                "$ref": "#/components/schemas/PromptEncoded"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "message",
                                  "steer",
                                  "action"
                                ]
                              },
                              "turn": {
                                "type": "string"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "content",
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "turns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "inheritedTurns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "default",
                                      "plan"
                                    ]
                                  },
                                  "model": {
                                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "arguments": {
                                    "type": "object"
                                  },
                                  "source": {
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false
                              },
                              "activeAction": {
                                "type": "object",
                                "properties": {
                                  "item": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "arguments": {
                                        "type": "object"
                                      },
                                      "source": {
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "arguments"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "item",
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Running"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Waiting"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "result": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "finishReason": {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "content-filter",
                                              "tool-calls",
                                              "error",
                                              "pause",
                                              "other",
                                              "unknown"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "finishReason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "model_error",
                                          "internal_error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "message",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Interrupted"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "steps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "usage": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/effect_ai_AiResponse_UsageEncoded"
                                }
                              },
                              "input": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "start": {
                                "type": "string"
                              },
                              "end": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "number"
                              },
                              "completedAt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "session",
                              "settings",
                              "status",
                              "steps",
                              "input",
                              "items",
                              "start",
                              "startedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "business": {
                          "type": "object"
                        },
                        "forkedFrom": {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "version"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "revision",
                        "head",
                        "metadata",
                        "settings",
                        "pending",
                        "turns",
                        "inheritedTurns",
                        "business"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "schemaVersion": {
                              "type": "string"
                            },
                            "parents": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": false
                                },
                                {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "maxItems": 1,
                                  "minItems": 1
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "schemaVersion",
                            "parents"
                          ],
                          "additionalProperties": false
                        },
                        "value": {
                          "type": "object",
                          "properties": {
                            "conversation": {
                              "type": "object",
                              "properties": {
                                "history": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "$ref": "#/components/schemas/PromptEncoded"
                                      },
                                      "origin": {
                                        "type": "object",
                                        "properties": {
                                          "session": {
                                            "type": "string"
                                          },
                                          "turn": {
                                            "type": "string"
                                          },
                                          "step": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "session",
                                          "turn",
                                          "step"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "context": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Prompt"
                                          ]
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Native"
                                          ]
                                        },
                                        "provider": {
                                          "type": "string"
                                        },
                                        "model": {
                                          "type": "string"
                                        },
                                        "items": {
                                          "type": "array"
                                        },
                                        "prompt": {
                                          "$ref": "#/components/schemas/PromptEncoded"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "provider",
                                        "model",
                                        "items",
                                        "prompt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "closed": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "history",
                                "context",
                                "closed"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "conversation"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "version",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "delegated",
                        "review"
                      ]
                    },
                    "parent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "toolCallId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "session",
                            "turn",
                            "toolCallId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "response": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "usage": {
                              "type": "object",
                              "properties": {
                                "inputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "uncached": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheRead": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "cacheWrite": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "outputTokens": {
                                  "type": "object",
                                  "properties": {
                                    "total": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "text": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "reasoning": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "inputTokens",
                                "outputTokens"
                              ],
                              "additionalProperties": false
                            },
                            "id": {
                              "type": "string"
                            },
                            "object": {
                              "type": "string",
                              "enum": [
                                "response"
                              ]
                            },
                            "created_at": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "session": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "background": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "in_progress",
                                "completed",
                                "incomplete",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "output": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "message"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "assistant"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "in_progress",
                                      "completed",
                                      "incomplete"
                                    ]
                                  },
                                  "content": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "annotations": {
                                          "type": "array",
                                          "items": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text",
                                        "annotations"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "role",
                                  "status",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "enum": [
                                        "model_error",
                                        "internal_error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "incomplete_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "max_output_tokens",
                                        "content_filter",
                                        "other"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "object",
                            "created_at",
                            "session",
                            "version",
                            "background",
                            "status",
                            "output",
                            "error",
                            "incomplete_details"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activity": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "historical"
                      ]
                    }
                  },
                  "required": [
                    "session",
                    "state",
                    "agent",
                    "kind",
                    "parent",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SessionInvalidRecord | SessionModelInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionInvalidRecordEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionModelInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "SessionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionBusy | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionBusyEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "SessionStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "not": {
                  "type": "null"
                }
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/agents": {
      "get": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.listAgents",
        "parameters": [
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          },
          {
            "name": "session",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "main",
                          "persistent",
                          "subagent"
                        ]
                      },
                      "owner": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Member"
                                ]
                              },
                              "userId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "_tag",
                              "userId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Organization"
                                ]
                              }
                            },
                            "required": [
                              "_tag"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Session"
                                ]
                              },
                              "userId": {
                                "type": "string"
                              },
                              "session": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "_tag",
                              "userId",
                              "session"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "name": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string"
                      },
                      "instructions": {
                        "type": "string"
                      },
                      "model": {
                        "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                      },
                      "archived": {
                        "type": "boolean"
                      },
                      "revision": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "owner",
                      "name",
                      "role",
                      "instructions",
                      "archived",
                      "revision",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Lists the Agents that the caller can use: their Main Agent, their own Agents and the shared Agents. With `session`, it lists the subagents of that Session."
      },
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.createAgent",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "main",
                        "persistent",
                        "subagent"
                      ]
                    },
                    "owner": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Member"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Organization"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Session"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            },
                            "session": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId",
                            "session"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "instructions": {
                      "type": "string"
                    },
                    "model": {
                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                    },
                    "archived": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "owner",
                    "name",
                    "role",
                    "instructions",
                    "archived",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "role": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "instructions": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "model": {
                    "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                  },
                  "shared": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "role",
                  "instructions"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/agents/{agentId}": {
      "get": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.getAgent",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "main",
                        "persistent",
                        "subagent"
                      ]
                    },
                    "owner": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Member"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Organization"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Session"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            },
                            "session": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId",
                            "session"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "instructions": {
                      "type": "string"
                    },
                    "model": {
                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                    },
                    "archived": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "owner",
                    "name",
                    "role",
                    "instructions",
                    "archived",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.updateAgent",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "main",
                        "persistent",
                        "subagent"
                      ]
                    },
                    "owner": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Member"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Organization"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Session"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            },
                            "session": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId",
                            "session"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "instructions": {
                      "type": "string"
                    },
                    "model": {
                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                    },
                    "archived": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "owner",
                    "name",
                    "role",
                    "instructions",
                    "archived",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "role": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "instructions": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "model": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "archived": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "expected"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/agents/{agentId}/promote": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.promoteAgent",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "main",
                        "persistent",
                        "subagent"
                      ]
                    },
                    "owner": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Member"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Organization"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Session"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            },
                            "session": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId",
                            "session"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "instructions": {
                      "type": "string"
                    },
                    "model": {
                      "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                    },
                    "archived": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "owner",
                    "name",
                    "role",
                    "instructions",
                    "archived",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Makes a subagent a lasting Agent of the caller. Its Session memory becomes its Agent memory.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "expected"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/agents/{agentId}/memory": {
      "get": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.agentMemory",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "content": {
                            "type": "string",
                            "minLength": 1
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "procedure",
                              "preference",
                              "decision"
                            ]
                          },
                          "sources": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "session": {
                                  "type": "string"
                                },
                                "item": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "session",
                                "item"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "updatedAt": {
                            "type": "number"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "retracted"
                            ]
                          }
                        },
                        "required": [
                          "key",
                          "content",
                          "kind",
                          "sources",
                          "updatedAt",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "entries",
                    "version"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.updateAgentMemory",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "content": {
                            "type": "string",
                            "minLength": 1
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "procedure",
                              "preference",
                              "decision"
                            ]
                          },
                          "sources": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "session": {
                                  "type": "string"
                                },
                                "item": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "session",
                                "item"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "updatedAt": {
                            "type": "number"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "retracted"
                            ]
                          }
                        },
                        "required": [
                          "key",
                          "content",
                          "kind",
                          "sources",
                          "updatedAt",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "entries",
                    "version"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "command": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "_tag": {
                            "type": "string",
                            "enum": [
                              "Remember"
                            ]
                          },
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "content": {
                            "type": "string",
                            "minLength": 1
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "procedure",
                              "preference",
                              "decision"
                            ]
                          }
                        },
                        "required": [
                          "_tag",
                          "key",
                          "content",
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "_tag": {
                            "type": "string",
                            "enum": [
                              "Forget"
                            ]
                          },
                          "key": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "_tag",
                          "key"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "expected",
                  "command"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/agents/{agentId}/memory/log": {
      "get": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.agentMemoryLog",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "at": {
                        "type": "number"
                      },
                      "by": {
                        "type": "string",
                        "enum": [
                          "consolidation",
                          "person",
                          "promotion"
                        ]
                      },
                      "keys": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "version",
                      "at",
                      "by",
                      "keys"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agentId}/rules": {
      "get": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.listRules",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "agent": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "author": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Person"
                                ]
                              },
                              "userId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "_tag",
                              "userId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Agent"
                                ]
                              },
                              "agent": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              }
                            },
                            "required": [
                              "_tag",
                              "agent"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Rule"
                                ]
                              },
                              "rule": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "_tag",
                              "rule"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "text": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "active",
                          "proposed",
                          "retired"
                        ]
                      },
                      "version": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "updatedAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "agent",
                      "author",
                      "text",
                      "status",
                      "version",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.createRule",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "author": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Person"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Agent"
                              ]
                            },
                            "agent": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "_tag",
                            "agent"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Rule"
                              ]
                            },
                            "rule": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "rule"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "proposed",
                        "retired"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "agent",
                    "author",
                    "text",
                    "status",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Adds a Rule that the caller wrote for this Agent. A Rule from a person is active at once.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/agents/{agentId}/rules/{ruleId}": {
      "patch": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.updateRule",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          },
          {
            "name": "ruleId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "author": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Person"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Agent"
                              ]
                            },
                            "agent": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "_tag",
                            "agent"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Rule"
                              ]
                            },
                            "rule": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "rule"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "proposed",
                        "retired"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "agent",
                    "author",
                    "text",
                    "status",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Changes the text of a Rule, confirms a proposed Rule, or retires a Rule.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "retired"
                    ]
                  }
                },
                "required": [
                  "expected"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/agents/{agentId}/grants": {
      "get": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.listGrants",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "used",
                "revoked"
              ]
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "agent": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "capability": {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "enum": [
                              "tools.call",
                              "apps.call",
                              "agents.spawn",
                              "agents.delegate"
                            ]
                          },
                          "target": {
                            "type": "string",
                            "maxLength": 512
                          },
                          "arguments": {
                            "type": "object"
                          }
                        },
                        "required": [
                          "action",
                          "target"
                        ],
                        "additionalProperties": false
                      },
                      "effect": {
                        "type": "string",
                        "enum": [
                          "allow",
                          "deny"
                        ]
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "once",
                          "session",
                          "lifetime"
                        ]
                      },
                      "session": {
                        "type": "string"
                      },
                      "grantedBy": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Person"
                                ]
                              },
                              "userId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "_tag",
                              "userId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Agent"
                                ]
                              },
                              "agent": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              }
                            },
                            "required": [
                              "_tag",
                              "agent"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Rule"
                                ]
                              },
                              "rule": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "_tag",
                              "rule"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "reason": {
                        "type": "string"
                      },
                      "parent": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "active",
                          "used",
                          "revoked"
                        ]
                      },
                      "createdAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "agent",
                      "capability",
                      "effect",
                      "scope",
                      "grantedBy",
                      "status",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.createGrant",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "capability": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "enum": [
                            "tools.call",
                            "apps.call",
                            "agents.spawn",
                            "agents.delegate"
                          ]
                        },
                        "target": {
                          "type": "string",
                          "maxLength": 512
                        },
                        "arguments": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "action",
                        "target"
                      ],
                      "additionalProperties": false
                    },
                    "effect": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny"
                      ]
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "once",
                        "session",
                        "lifetime"
                      ]
                    },
                    "session": {
                      "type": "string"
                    },
                    "grantedBy": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Person"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Agent"
                              ]
                            },
                            "agent": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "_tag",
                            "agent"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Rule"
                              ]
                            },
                            "rule": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "rule"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "parent": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "used",
                        "revoked"
                      ]
                    },
                    "createdAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "agent",
                    "capability",
                    "effect",
                    "scope",
                    "grantedBy",
                    "status",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "capability": {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "enum": [
                          "tools.call",
                          "apps.call",
                          "agents.spawn",
                          "agents.delegate"
                        ]
                      },
                      "target": {
                        "type": "string",
                        "maxLength": 512
                      },
                      "arguments": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "action",
                      "target"
                    ],
                    "additionalProperties": false
                  },
                  "effect": {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny"
                    ]
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "once",
                      "session",
                      "lifetime"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "capability",
                  "effect",
                  "scope"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/agents/{agentId}/grants/{grantId}": {
      "delete": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents.revokeGrant",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true
          },
          {
            "name": "grantId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Revokes a Grant and every Grant that came from it."
      }
    },
    "/v1/requests": {
      "get": {
        "tags": [
          "Requests"
        ],
        "operationId": "requests.listRequests",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "allowed",
                "denied",
                "expired",
                "cancelled"
              ]
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "agent": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "capability": {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "enum": [
                              "tools.call",
                              "apps.call",
                              "agents.spawn",
                              "agents.delegate"
                            ]
                          },
                          "target": {
                            "type": "string",
                            "maxLength": 512
                          },
                          "arguments": {
                            "type": "object"
                          }
                        },
                        "required": [
                          "action",
                          "target"
                        ],
                        "additionalProperties": false
                      },
                      "reason": {
                        "type": "string"
                      },
                      "approver": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Person"
                                ]
                              },
                              "userId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "_tag",
                              "userId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Agent"
                                ]
                              },
                              "agent": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              }
                            },
                            "required": [
                              "_tag",
                              "agent"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "chain": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        }
                      },
                      "session": {
                        "type": "string"
                      },
                      "turn": {
                        "type": "string"
                      },
                      "toolCallId": {
                        "type": "string"
                      },
                      "app": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "session": {
                            "type": "string"
                          },
                          "turn": {
                            "type": "string"
                          },
                          "callId": {
                            "type": "string"
                          },
                          "toolName": {
                            "type": "string"
                          },
                          "source": {
                            "type": "object",
                            "properties": {
                              "connectionId": {
                                "type": "string"
                              },
                              "connectionName": {
                                "type": "string"
                              },
                              "cardUrl": {
                                "type": "string"
                              },
                              "appName": {
                                "type": "string"
                              },
                              "remoteIndex": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "revision": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tool",
                                  "resource",
                                  "template",
                                  "prompt"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "definition": {}
                            },
                            "required": [
                              "connectionId",
                              "connectionName",
                              "cardUrl",
                              "appName",
                              "remoteIndex",
                              "revision",
                              "kind",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "arguments": {
                            "type": "object"
                          },
                          "readOnly": {
                            "type": "boolean"
                          },
                          "round": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "PendingApproval",
                              "Approved",
                              "Rejected",
                              "Sending",
                              "InputRequired",
                              "Completed",
                              "Failed",
                              "OutcomeUnknown"
                            ]
                          },
                          "result": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Completed"
                                        ]
                                      },
                                      "source": {
                                        "type": "object",
                                        "properties": {
                                          "connectionId": {
                                            "type": "string"
                                          },
                                          "connectionName": {
                                            "type": "string"
                                          },
                                          "cardUrl": {
                                            "type": "string"
                                          },
                                          "appName": {
                                            "type": "string"
                                          },
                                          "remoteIndex": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "revision": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "tool",
                                              "resource",
                                              "template",
                                              "prompt"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "definition": {}
                                        },
                                        "required": [
                                          "connectionId",
                                          "connectionName",
                                          "cardUrl",
                                          "appName",
                                          "remoteIndex",
                                          "revision",
                                          "kind",
                                          "name"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "result": {},
                                      "operationId": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "source",
                                      "result"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "InputRequired"
                                        ]
                                      },
                                      "source": {
                                        "type": "object",
                                        "properties": {
                                          "connectionId": {
                                            "type": "string"
                                          },
                                          "connectionName": {
                                            "type": "string"
                                          },
                                          "cardUrl": {
                                            "type": "string"
                                          },
                                          "appName": {
                                            "type": "string"
                                          },
                                          "remoteIndex": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "revision": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "tool",
                                              "resource",
                                              "template",
                                              "prompt"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "definition": {}
                                        },
                                        "required": [
                                          "connectionId",
                                          "connectionName",
                                          "cardUrl",
                                          "appName",
                                          "remoteIndex",
                                          "revision",
                                          "kind",
                                          "name"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "request": {},
                                      "operationId": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "source",
                                      "request"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Failed"
                                        ]
                                      },
                                      "source": {
                                        "type": "object",
                                        "properties": {
                                          "connectionId": {
                                            "type": "string"
                                          },
                                          "connectionName": {
                                            "type": "string"
                                          },
                                          "cardUrl": {
                                            "type": "string"
                                          },
                                          "appName": {
                                            "type": "string"
                                          },
                                          "remoteIndex": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "revision": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "tool",
                                              "resource",
                                              "template",
                                              "prompt"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "definition": {}
                                        },
                                        "required": [
                                          "connectionId",
                                          "connectionName",
                                          "cardUrl",
                                          "appName",
                                          "remoteIndex",
                                          "revision",
                                          "kind",
                                          "name"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "reason": {
                                        "type": "string"
                                      },
                                      "cause": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "result": {},
                                      "operationId": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "source",
                                      "reason",
                                      "message"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "session",
                          "turn",
                          "callId",
                          "toolName",
                          "source",
                          "arguments",
                          "readOnly",
                          "round",
                          "status",
                          "result"
                        ],
                        "additionalProperties": false
                      },
                      "endorsements": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "agent": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "once",
                                "session",
                                "lifetime"
                              ]
                            },
                            "reason": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "agent",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "allowed",
                          "denied",
                          "expired",
                          "cancelled"
                        ]
                      },
                      "decision": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "by": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Person"
                                        ]
                                      },
                                      "userId": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "userId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Agent"
                                        ]
                                      },
                                      "agent": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "agent"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Rule"
                                        ]
                                      },
                                      "rule": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "rule"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "scope": {
                                "type": "string",
                                "enum": [
                                  "once",
                                  "session",
                                  "lifetime"
                                ]
                              },
                              "reason": {
                                "type": "string"
                              },
                              "question": {
                                "type": "string"
                              },
                              "at": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "by",
                              "at"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "revision": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "createdAt": {
                        "type": "number"
                      },
                      "expiresAt": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "agent",
                      "capability",
                      "reason",
                      "approver",
                      "chain",
                      "session",
                      "turn",
                      "toolCallId",
                      "endorsements",
                      "status",
                      "decision",
                      "revision",
                      "createdAt",
                      "expiresAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound | RequestNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RequestNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict | RequestConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RequestConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Lists the requests that wait for the caller, or that the caller answered."
      }
    },
    "/v1/requests/{requestId}": {
      "get": {
        "tags": [
          "Requests"
        ],
        "operationId": "requests.getRequest",
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "capability": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "enum": [
                            "tools.call",
                            "apps.call",
                            "agents.spawn",
                            "agents.delegate"
                          ]
                        },
                        "target": {
                          "type": "string",
                          "maxLength": 512
                        },
                        "arguments": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "action",
                        "target"
                      ],
                      "additionalProperties": false
                    },
                    "reason": {
                      "type": "string"
                    },
                    "approver": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Person"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Agent"
                              ]
                            },
                            "agent": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "_tag",
                            "agent"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "chain": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      }
                    },
                    "session": {
                      "type": "string"
                    },
                    "turn": {
                      "type": "string"
                    },
                    "toolCallId": {
                      "type": "string"
                    },
                    "app": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "session": {
                          "type": "string"
                        },
                        "turn": {
                          "type": "string"
                        },
                        "callId": {
                          "type": "string"
                        },
                        "toolName": {
                          "type": "string"
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "connectionId": {
                              "type": "string"
                            },
                            "connectionName": {
                              "type": "string"
                            },
                            "cardUrl": {
                              "type": "string"
                            },
                            "appName": {
                              "type": "string"
                            },
                            "remoteIndex": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "tool",
                                "resource",
                                "template",
                                "prompt"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "definition": {}
                          },
                          "required": [
                            "connectionId",
                            "connectionName",
                            "cardUrl",
                            "appName",
                            "remoteIndex",
                            "revision",
                            "kind",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "arguments": {
                          "type": "object"
                        },
                        "readOnly": {
                          "type": "boolean"
                        },
                        "round": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PendingApproval",
                            "Approved",
                            "Rejected",
                            "Sending",
                            "InputRequired",
                            "Completed",
                            "Failed",
                            "OutcomeUnknown"
                          ]
                        },
                        "result": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Completed"
                                      ]
                                    },
                                    "source": {
                                      "type": "object",
                                      "properties": {
                                        "connectionId": {
                                          "type": "string"
                                        },
                                        "connectionName": {
                                          "type": "string"
                                        },
                                        "cardUrl": {
                                          "type": "string"
                                        },
                                        "appName": {
                                          "type": "string"
                                        },
                                        "remoteIndex": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "revision": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "tool",
                                            "resource",
                                            "template",
                                            "prompt"
                                          ]
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "definition": {}
                                      },
                                      "required": [
                                        "connectionId",
                                        "connectionName",
                                        "cardUrl",
                                        "appName",
                                        "remoteIndex",
                                        "revision",
                                        "kind",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "result": {},
                                    "operationId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "source",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "InputRequired"
                                      ]
                                    },
                                    "source": {
                                      "type": "object",
                                      "properties": {
                                        "connectionId": {
                                          "type": "string"
                                        },
                                        "connectionName": {
                                          "type": "string"
                                        },
                                        "cardUrl": {
                                          "type": "string"
                                        },
                                        "appName": {
                                          "type": "string"
                                        },
                                        "remoteIndex": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "revision": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "tool",
                                            "resource",
                                            "template",
                                            "prompt"
                                          ]
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "definition": {}
                                      },
                                      "required": [
                                        "connectionId",
                                        "connectionName",
                                        "cardUrl",
                                        "appName",
                                        "remoteIndex",
                                        "revision",
                                        "kind",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "request": {},
                                    "operationId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "source",
                                    "request"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Failed"
                                      ]
                                    },
                                    "source": {
                                      "type": "object",
                                      "properties": {
                                        "connectionId": {
                                          "type": "string"
                                        },
                                        "connectionName": {
                                          "type": "string"
                                        },
                                        "cardUrl": {
                                          "type": "string"
                                        },
                                        "appName": {
                                          "type": "string"
                                        },
                                        "remoteIndex": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "revision": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "tool",
                                            "resource",
                                            "template",
                                            "prompt"
                                          ]
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "definition": {}
                                      },
                                      "required": [
                                        "connectionId",
                                        "connectionName",
                                        "cardUrl",
                                        "appName",
                                        "remoteIndex",
                                        "revision",
                                        "kind",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "reason": {
                                      "type": "string"
                                    },
                                    "cause": {
                                      "type": "string"
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "result": {},
                                    "operationId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "source",
                                    "reason",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "session",
                        "turn",
                        "callId",
                        "toolName",
                        "source",
                        "arguments",
                        "readOnly",
                        "round",
                        "status",
                        "result"
                      ],
                      "additionalProperties": false
                    },
                    "endorsements": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agent": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "once",
                              "session",
                              "lifetime"
                            ]
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agent",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "allowed",
                        "denied",
                        "expired",
                        "cancelled"
                      ]
                    },
                    "decision": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "by": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Person"
                                      ]
                                    },
                                    "userId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "userId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Agent"
                                      ]
                                    },
                                    "agent": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "agent"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Rule"
                                      ]
                                    },
                                    "rule": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "rule"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "once",
                                "session",
                                "lifetime"
                              ]
                            },
                            "reason": {
                              "type": "string"
                            },
                            "question": {
                              "type": "string"
                            },
                            "at": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "by",
                            "at"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "agent",
                    "capability",
                    "reason",
                    "approver",
                    "chain",
                    "session",
                    "turn",
                    "toolCallId",
                    "endorsements",
                    "status",
                    "decision",
                    "revision",
                    "createdAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound | RequestNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RequestNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict | RequestConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RequestConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Requests"
        ],
        "operationId": "requests.resolveRequest",
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "agent": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "capability": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "enum": [
                            "tools.call",
                            "apps.call",
                            "agents.spawn",
                            "agents.delegate"
                          ]
                        },
                        "target": {
                          "type": "string",
                          "maxLength": 512
                        },
                        "arguments": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "action",
                        "target"
                      ],
                      "additionalProperties": false
                    },
                    "reason": {
                      "type": "string"
                    },
                    "approver": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Person"
                              ]
                            },
                            "userId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Agent"
                              ]
                            },
                            "agent": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "_tag",
                            "agent"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "chain": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      }
                    },
                    "session": {
                      "type": "string"
                    },
                    "turn": {
                      "type": "string"
                    },
                    "toolCallId": {
                      "type": "string"
                    },
                    "app": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "session": {
                          "type": "string"
                        },
                        "turn": {
                          "type": "string"
                        },
                        "callId": {
                          "type": "string"
                        },
                        "toolName": {
                          "type": "string"
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "connectionId": {
                              "type": "string"
                            },
                            "connectionName": {
                              "type": "string"
                            },
                            "cardUrl": {
                              "type": "string"
                            },
                            "appName": {
                              "type": "string"
                            },
                            "remoteIndex": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "tool",
                                "resource",
                                "template",
                                "prompt"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "definition": {}
                          },
                          "required": [
                            "connectionId",
                            "connectionName",
                            "cardUrl",
                            "appName",
                            "remoteIndex",
                            "revision",
                            "kind",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "arguments": {
                          "type": "object"
                        },
                        "readOnly": {
                          "type": "boolean"
                        },
                        "round": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PendingApproval",
                            "Approved",
                            "Rejected",
                            "Sending",
                            "InputRequired",
                            "Completed",
                            "Failed",
                            "OutcomeUnknown"
                          ]
                        },
                        "result": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Completed"
                                      ]
                                    },
                                    "source": {
                                      "type": "object",
                                      "properties": {
                                        "connectionId": {
                                          "type": "string"
                                        },
                                        "connectionName": {
                                          "type": "string"
                                        },
                                        "cardUrl": {
                                          "type": "string"
                                        },
                                        "appName": {
                                          "type": "string"
                                        },
                                        "remoteIndex": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "revision": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "tool",
                                            "resource",
                                            "template",
                                            "prompt"
                                          ]
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "definition": {}
                                      },
                                      "required": [
                                        "connectionId",
                                        "connectionName",
                                        "cardUrl",
                                        "appName",
                                        "remoteIndex",
                                        "revision",
                                        "kind",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "result": {},
                                    "operationId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "source",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "InputRequired"
                                      ]
                                    },
                                    "source": {
                                      "type": "object",
                                      "properties": {
                                        "connectionId": {
                                          "type": "string"
                                        },
                                        "connectionName": {
                                          "type": "string"
                                        },
                                        "cardUrl": {
                                          "type": "string"
                                        },
                                        "appName": {
                                          "type": "string"
                                        },
                                        "remoteIndex": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "revision": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "tool",
                                            "resource",
                                            "template",
                                            "prompt"
                                          ]
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "definition": {}
                                      },
                                      "required": [
                                        "connectionId",
                                        "connectionName",
                                        "cardUrl",
                                        "appName",
                                        "remoteIndex",
                                        "revision",
                                        "kind",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "request": {},
                                    "operationId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "source",
                                    "request"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Failed"
                                      ]
                                    },
                                    "source": {
                                      "type": "object",
                                      "properties": {
                                        "connectionId": {
                                          "type": "string"
                                        },
                                        "connectionName": {
                                          "type": "string"
                                        },
                                        "cardUrl": {
                                          "type": "string"
                                        },
                                        "appName": {
                                          "type": "string"
                                        },
                                        "remoteIndex": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "revision": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "tool",
                                            "resource",
                                            "template",
                                            "prompt"
                                          ]
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "definition": {}
                                      },
                                      "required": [
                                        "connectionId",
                                        "connectionName",
                                        "cardUrl",
                                        "appName",
                                        "remoteIndex",
                                        "revision",
                                        "kind",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "reason": {
                                      "type": "string"
                                    },
                                    "cause": {
                                      "type": "string"
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "result": {},
                                    "operationId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "source",
                                    "reason",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "session",
                        "turn",
                        "callId",
                        "toolName",
                        "source",
                        "arguments",
                        "readOnly",
                        "round",
                        "status",
                        "result"
                      ],
                      "additionalProperties": false
                    },
                    "endorsements": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agent": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "once",
                              "session",
                              "lifetime"
                            ]
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agent",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "allowed",
                        "denied",
                        "expired",
                        "cancelled"
                      ]
                    },
                    "decision": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "by": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Person"
                                      ]
                                    },
                                    "userId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "userId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Agent"
                                      ]
                                    },
                                    "agent": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "agent"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Rule"
                                      ]
                                    },
                                    "rule": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "rule"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "once",
                                "session",
                                "lifetime"
                              ]
                            },
                            "reason": {
                              "type": "string"
                            },
                            "question": {
                              "type": "string"
                            },
                            "at": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "by",
                            "at"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "expiresAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "agent",
                    "capability",
                    "reason",
                    "approver",
                    "chain",
                    "session",
                    "turn",
                    "toolCallId",
                    "endorsements",
                    "status",
                    "decision",
                    "revision",
                    "createdAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "AgentInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "AgentNotFound | RequestNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RequestNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "AgentConflict | RequestConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RequestConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | AgentStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AgentStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Allows or denies a request. The waiting work goes on at once.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "decision": {
                    "type": "string",
                    "enum": [
                      "allow",
                      "deny"
                    ]
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "once",
                      "session",
                      "lifetime"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "rule": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  }
                },
                "required": [
                  "expected",
                  "decision"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/app-operations/{id}": {
      "get": {
        "tags": [
          "App operations"
        ],
        "operationId": "appOperations.get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "session": {
                      "type": "string"
                    },
                    "turn": {
                      "type": "string"
                    },
                    "callId": {
                      "type": "string"
                    },
                    "toolName": {
                      "type": "string"
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "connectionId": {
                          "type": "string"
                        },
                        "connectionName": {
                          "type": "string"
                        },
                        "cardUrl": {
                          "type": "string"
                        },
                        "appName": {
                          "type": "string"
                        },
                        "remoteIndex": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "tool",
                            "resource",
                            "template",
                            "prompt"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "definition": {}
                      },
                      "required": [
                        "connectionId",
                        "connectionName",
                        "cardUrl",
                        "appName",
                        "remoteIndex",
                        "revision",
                        "kind",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "arguments": {
                      "type": "object"
                    },
                    "readOnly": {
                      "type": "boolean"
                    },
                    "round": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "PendingApproval",
                        "Approved",
                        "Rejected",
                        "Sending",
                        "InputRequired",
                        "Completed",
                        "Failed",
                        "OutcomeUnknown"
                      ]
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Completed"
                                  ]
                                },
                                "source": {
                                  "type": "object",
                                  "properties": {
                                    "connectionId": {
                                      "type": "string"
                                    },
                                    "connectionName": {
                                      "type": "string"
                                    },
                                    "cardUrl": {
                                      "type": "string"
                                    },
                                    "appName": {
                                      "type": "string"
                                    },
                                    "remoteIndex": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "revision": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tool",
                                        "resource",
                                        "template",
                                        "prompt"
                                      ]
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "definition": {}
                                  },
                                  "required": [
                                    "connectionId",
                                    "connectionName",
                                    "cardUrl",
                                    "appName",
                                    "remoteIndex",
                                    "revision",
                                    "kind",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "result": {},
                                "operationId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "source",
                                "result"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "InputRequired"
                                  ]
                                },
                                "source": {
                                  "type": "object",
                                  "properties": {
                                    "connectionId": {
                                      "type": "string"
                                    },
                                    "connectionName": {
                                      "type": "string"
                                    },
                                    "cardUrl": {
                                      "type": "string"
                                    },
                                    "appName": {
                                      "type": "string"
                                    },
                                    "remoteIndex": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "revision": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tool",
                                        "resource",
                                        "template",
                                        "prompt"
                                      ]
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "definition": {}
                                  },
                                  "required": [
                                    "connectionId",
                                    "connectionName",
                                    "cardUrl",
                                    "appName",
                                    "remoteIndex",
                                    "revision",
                                    "kind",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "request": {},
                                "operationId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "source",
                                "request"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Failed"
                                  ]
                                },
                                "source": {
                                  "type": "object",
                                  "properties": {
                                    "connectionId": {
                                      "type": "string"
                                    },
                                    "connectionName": {
                                      "type": "string"
                                    },
                                    "cardUrl": {
                                      "type": "string"
                                    },
                                    "appName": {
                                      "type": "string"
                                    },
                                    "remoteIndex": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "revision": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tool",
                                        "resource",
                                        "template",
                                        "prompt"
                                      ]
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "definition": {}
                                  },
                                  "required": [
                                    "connectionId",
                                    "connectionName",
                                    "cardUrl",
                                    "appName",
                                    "remoteIndex",
                                    "revision",
                                    "kind",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "reason": {
                                  "type": "string"
                                },
                                "cause": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "result": {},
                                "operationId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "source",
                                "reason",
                                "message"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "session",
                    "turn",
                    "callId",
                    "toolName",
                    "source",
                    "arguments",
                    "readOnly",
                    "round",
                    "status",
                    "result"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/app-operations": {
      "get": {
        "tags": [
          "App operations"
        ],
        "operationId": "appOperations.list",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "session": {
                        "type": "string"
                      },
                      "turn": {
                        "type": "string"
                      },
                      "callId": {
                        "type": "string"
                      },
                      "toolName": {
                        "type": "string"
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "connectionId": {
                            "type": "string"
                          },
                          "connectionName": {
                            "type": "string"
                          },
                          "cardUrl": {
                            "type": "string"
                          },
                          "appName": {
                            "type": "string"
                          },
                          "remoteIndex": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tool",
                              "resource",
                              "template",
                              "prompt"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "definition": {}
                        },
                        "required": [
                          "connectionId",
                          "connectionName",
                          "cardUrl",
                          "appName",
                          "remoteIndex",
                          "revision",
                          "kind",
                          "name"
                        ],
                        "additionalProperties": false
                      },
                      "arguments": {
                        "type": "object"
                      },
                      "readOnly": {
                        "type": "boolean"
                      },
                      "round": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "PendingApproval",
                          "Approved",
                          "Rejected",
                          "Sending",
                          "InputRequired",
                          "Completed",
                          "Failed",
                          "OutcomeUnknown"
                        ]
                      },
                      "result": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Completed"
                                    ]
                                  },
                                  "source": {
                                    "type": "object",
                                    "properties": {
                                      "connectionId": {
                                        "type": "string"
                                      },
                                      "connectionName": {
                                        "type": "string"
                                      },
                                      "cardUrl": {
                                        "type": "string"
                                      },
                                      "appName": {
                                        "type": "string"
                                      },
                                      "remoteIndex": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "revision": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool",
                                          "resource",
                                          "template",
                                          "prompt"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "definition": {}
                                    },
                                    "required": [
                                      "connectionId",
                                      "connectionName",
                                      "cardUrl",
                                      "appName",
                                      "remoteIndex",
                                      "revision",
                                      "kind",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "result": {},
                                  "operationId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "source",
                                  "result"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "InputRequired"
                                    ]
                                  },
                                  "source": {
                                    "type": "object",
                                    "properties": {
                                      "connectionId": {
                                        "type": "string"
                                      },
                                      "connectionName": {
                                        "type": "string"
                                      },
                                      "cardUrl": {
                                        "type": "string"
                                      },
                                      "appName": {
                                        "type": "string"
                                      },
                                      "remoteIndex": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "revision": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool",
                                          "resource",
                                          "template",
                                          "prompt"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "definition": {}
                                    },
                                    "required": [
                                      "connectionId",
                                      "connectionName",
                                      "cardUrl",
                                      "appName",
                                      "remoteIndex",
                                      "revision",
                                      "kind",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "request": {},
                                  "operationId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "source",
                                  "request"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "_tag": {
                                    "type": "string",
                                    "enum": [
                                      "Failed"
                                    ]
                                  },
                                  "source": {
                                    "type": "object",
                                    "properties": {
                                      "connectionId": {
                                        "type": "string"
                                      },
                                      "connectionName": {
                                        "type": "string"
                                      },
                                      "cardUrl": {
                                        "type": "string"
                                      },
                                      "appName": {
                                        "type": "string"
                                      },
                                      "remoteIndex": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "revision": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool",
                                          "resource",
                                          "template",
                                          "prompt"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "definition": {}
                                    },
                                    "required": [
                                      "connectionId",
                                      "connectionName",
                                      "cardUrl",
                                      "appName",
                                      "remoteIndex",
                                      "revision",
                                      "kind",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "reason": {
                                    "type": "string"
                                  },
                                  "cause": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "result": {},
                                  "operationId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "_tag",
                                  "source",
                                  "reason",
                                  "message"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "session",
                      "turn",
                      "callId",
                      "toolName",
                      "source",
                      "arguments",
                      "readOnly",
                      "round",
                      "status",
                      "result"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-operations/{id}/inputs": {
      "post": {
        "tags": [
          "App operations"
        ],
        "operationId": "appOperations.respond",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "session": {
                      "type": "string"
                    },
                    "turn": {
                      "type": "string"
                    },
                    "callId": {
                      "type": "string"
                    },
                    "toolName": {
                      "type": "string"
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "connectionId": {
                          "type": "string"
                        },
                        "connectionName": {
                          "type": "string"
                        },
                        "cardUrl": {
                          "type": "string"
                        },
                        "appName": {
                          "type": "string"
                        },
                        "remoteIndex": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "tool",
                            "resource",
                            "template",
                            "prompt"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "definition": {}
                      },
                      "required": [
                        "connectionId",
                        "connectionName",
                        "cardUrl",
                        "appName",
                        "remoteIndex",
                        "revision",
                        "kind",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "arguments": {
                      "type": "object"
                    },
                    "readOnly": {
                      "type": "boolean"
                    },
                    "round": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "PendingApproval",
                        "Approved",
                        "Rejected",
                        "Sending",
                        "InputRequired",
                        "Completed",
                        "Failed",
                        "OutcomeUnknown"
                      ]
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Completed"
                                  ]
                                },
                                "source": {
                                  "type": "object",
                                  "properties": {
                                    "connectionId": {
                                      "type": "string"
                                    },
                                    "connectionName": {
                                      "type": "string"
                                    },
                                    "cardUrl": {
                                      "type": "string"
                                    },
                                    "appName": {
                                      "type": "string"
                                    },
                                    "remoteIndex": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "revision": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tool",
                                        "resource",
                                        "template",
                                        "prompt"
                                      ]
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "definition": {}
                                  },
                                  "required": [
                                    "connectionId",
                                    "connectionName",
                                    "cardUrl",
                                    "appName",
                                    "remoteIndex",
                                    "revision",
                                    "kind",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "result": {},
                                "operationId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "source",
                                "result"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "InputRequired"
                                  ]
                                },
                                "source": {
                                  "type": "object",
                                  "properties": {
                                    "connectionId": {
                                      "type": "string"
                                    },
                                    "connectionName": {
                                      "type": "string"
                                    },
                                    "cardUrl": {
                                      "type": "string"
                                    },
                                    "appName": {
                                      "type": "string"
                                    },
                                    "remoteIndex": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "revision": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tool",
                                        "resource",
                                        "template",
                                        "prompt"
                                      ]
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "definition": {}
                                  },
                                  "required": [
                                    "connectionId",
                                    "connectionName",
                                    "cardUrl",
                                    "appName",
                                    "remoteIndex",
                                    "revision",
                                    "kind",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "request": {},
                                "operationId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "source",
                                "request"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Failed"
                                  ]
                                },
                                "source": {
                                  "type": "object",
                                  "properties": {
                                    "connectionId": {
                                      "type": "string"
                                    },
                                    "connectionName": {
                                      "type": "string"
                                    },
                                    "cardUrl": {
                                      "type": "string"
                                    },
                                    "appName": {
                                      "type": "string"
                                    },
                                    "remoteIndex": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "revision": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tool",
                                        "resource",
                                        "template",
                                        "prompt"
                                      ]
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "definition": {}
                                  },
                                  "required": [
                                    "connectionId",
                                    "connectionName",
                                    "cardUrl",
                                    "appName",
                                    "remoteIndex",
                                    "revision",
                                    "kind",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "reason": {
                                  "type": "string"
                                },
                                "cause": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "result": {},
                                "operationId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "_tag",
                                "source",
                                "reason",
                                "message"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "session",
                    "turn",
                    "callId",
                    "toolName",
                    "source",
                    "arguments",
                    "readOnly",
                    "round",
                    "status",
                    "result"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "round": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "responses": {
                    "type": "object"
                  }
                },
                "required": [
                  "round",
                  "responses"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/app-operations/{operationId}/view": {
      "post": {
        "tags": [
          "App views"
        ],
        "operationId": "appViews.open",
        "parameters": [
          {
            "name": "operationId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "operationId": {
                      "type": "string"
                    },
                    "readOnly": {
                      "type": "boolean"
                    },
                    "session": {
                      "type": "string"
                    },
                    "turn": {
                      "type": "string"
                    },
                    "item": {
                      "type": "string"
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "connectionId": {
                          "type": "string"
                        },
                        "connectionName": {
                          "type": "string"
                        },
                        "cardUrl": {
                          "type": "string"
                        },
                        "appName": {
                          "type": "string"
                        },
                        "remoteIndex": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "tool",
                            "resource",
                            "template",
                            "prompt"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "definition": {}
                      },
                      "required": [
                        "connectionId",
                        "connectionName",
                        "cardUrl",
                        "appName",
                        "remoteIndex",
                        "revision",
                        "kind",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "interaction": {
                      "type": "object",
                      "properties": {
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "context": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "revision",
                        "context"
                      ],
                      "additionalProperties": false
                    },
                    "resource": {
                      "type": "object",
                      "properties": {
                        "uri": {
                          "type": "string"
                        },
                        "mimeType": {
                          "type": "string",
                          "enum": [
                            "text/html;profile=mcp-app"
                          ]
                        },
                        "html": {
                          "type": "string",
                          "minLength": 1
                        },
                        "prefersBorder": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "uri",
                        "mimeType",
                        "html"
                      ],
                      "additionalProperties": false
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "arguments": {
                      "type": "object"
                    },
                    "result": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "id",
                    "operationId",
                    "readOnly",
                    "session",
                    "turn",
                    "item",
                    "source",
                    "interaction",
                    "resource",
                    "tools",
                    "arguments"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AppViewUnavailable | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppViewUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string"
                  },
                  "itemId": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  }
                },
                "required": [
                  "sessionId",
                  "itemId"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/app-views/{viewId}": {
      "get": {
        "tags": [
          "App views"
        ],
        "operationId": "appViews.get",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "operationId": {
                      "type": "string"
                    },
                    "readOnly": {
                      "type": "boolean"
                    },
                    "session": {
                      "type": "string"
                    },
                    "turn": {
                      "type": "string"
                    },
                    "item": {
                      "type": "string"
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "connectionId": {
                          "type": "string"
                        },
                        "connectionName": {
                          "type": "string"
                        },
                        "cardUrl": {
                          "type": "string"
                        },
                        "appName": {
                          "type": "string"
                        },
                        "remoteIndex": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "tool",
                            "resource",
                            "template",
                            "prompt"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "definition": {}
                      },
                      "required": [
                        "connectionId",
                        "connectionName",
                        "cardUrl",
                        "appName",
                        "remoteIndex",
                        "revision",
                        "kind",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "interaction": {
                      "type": "object",
                      "properties": {
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "context": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "revision",
                        "context"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "operationId",
                    "readOnly",
                    "session",
                    "turn",
                    "item",
                    "source",
                    "interaction"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AppViewUnavailable | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppViewUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "App views"
        ],
        "operationId": "appViews.close",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "<No Content>"
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AppViewUnavailable | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppViewUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-views/{viewId}/read": {
      "post": {
        "tags": [
          "App views"
        ],
        "operationId": "appViews.read",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AppViewUnavailable | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppViewUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "method": {
                    "type": "string",
                    "enum": [
                      "tools/list",
                      "resources/list",
                      "resources/templates/list"
                    ]
                  },
                  "params": {
                    "type": "object"
                  }
                },
                "required": [
                  "method",
                  "params"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/app-views/{viewId}/actions": {
      "post": {
        "tags": [
          "App views"
        ],
        "operationId": "appViews.act",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "string"
                    },
                    "turn": {
                      "type": "string"
                    },
                    "item": {
                      "type": "string"
                    },
                    "callId": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "session",
                    "turn",
                    "item",
                    "callId",
                    "revision",
                    "version"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AppViewUnavailable | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppViewUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tool"
                        ]
                      },
                      "requestId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "arguments": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "kind",
                      "requestId",
                      "name",
                      "arguments"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "resource"
                        ]
                      },
                      "requestId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "uri": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "kind",
                      "requestId",
                      "uri"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/app-views/{viewId}/actions/{requestId}": {
      "get": {
        "tags": [
          "App views"
        ],
        "operationId": "appViews.operation",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "requestId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ticket": {
                      "type": "object",
                      "properties": {
                        "session": {
                          "type": "string"
                        },
                        "turn": {
                          "type": "string"
                        },
                        "item": {
                          "type": "string"
                        },
                        "callId": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "version": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "session",
                        "turn",
                        "item",
                        "callId",
                        "revision",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Queued",
                        "PendingApproval",
                        "Approved",
                        "Rejected",
                        "Sending",
                        "InputRequired",
                        "Completed",
                        "Failed",
                        "OutcomeUnknown"
                      ]
                    },
                    "operation": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "session": {
                              "type": "string"
                            },
                            "turn": {
                              "type": "string"
                            },
                            "callId": {
                              "type": "string"
                            },
                            "toolName": {
                              "type": "string"
                            },
                            "source": {
                              "type": "object",
                              "properties": {
                                "connectionId": {
                                  "type": "string"
                                },
                                "connectionName": {
                                  "type": "string"
                                },
                                "cardUrl": {
                                  "type": "string"
                                },
                                "appName": {
                                  "type": "string"
                                },
                                "remoteIndex": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool",
                                    "resource",
                                    "template",
                                    "prompt"
                                  ]
                                },
                                "name": {
                                  "type": "string"
                                },
                                "definition": {}
                              },
                              "required": [
                                "connectionId",
                                "connectionName",
                                "cardUrl",
                                "appName",
                                "remoteIndex",
                                "revision",
                                "kind",
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            "arguments": {
                              "type": "object"
                            },
                            "readOnly": {
                              "type": "boolean"
                            },
                            "round": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "PendingApproval",
                                "Approved",
                                "Rejected",
                                "Sending",
                                "InputRequired",
                                "Completed",
                                "Failed",
                                "OutcomeUnknown"
                              ]
                            },
                            "result": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Completed"
                                          ]
                                        },
                                        "source": {
                                          "type": "object",
                                          "properties": {
                                            "connectionId": {
                                              "type": "string"
                                            },
                                            "connectionName": {
                                              "type": "string"
                                            },
                                            "cardUrl": {
                                              "type": "string"
                                            },
                                            "appName": {
                                              "type": "string"
                                            },
                                            "remoteIndex": {
                                              "type": "integer",
                                              "minimum": 0,
                                              "maximum": 9007199254740991
                                            },
                                            "revision": {
                                              "type": "integer",
                                              "minimum": 0,
                                              "maximum": 9007199254740991
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "tool",
                                                "resource",
                                                "template",
                                                "prompt"
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "definition": {}
                                          },
                                          "required": [
                                            "connectionId",
                                            "connectionName",
                                            "cardUrl",
                                            "appName",
                                            "remoteIndex",
                                            "revision",
                                            "kind",
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "result": {},
                                        "operationId": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "source",
                                        "result"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "InputRequired"
                                          ]
                                        },
                                        "source": {
                                          "type": "object",
                                          "properties": {
                                            "connectionId": {
                                              "type": "string"
                                            },
                                            "connectionName": {
                                              "type": "string"
                                            },
                                            "cardUrl": {
                                              "type": "string"
                                            },
                                            "appName": {
                                              "type": "string"
                                            },
                                            "remoteIndex": {
                                              "type": "integer",
                                              "minimum": 0,
                                              "maximum": 9007199254740991
                                            },
                                            "revision": {
                                              "type": "integer",
                                              "minimum": 0,
                                              "maximum": 9007199254740991
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "tool",
                                                "resource",
                                                "template",
                                                "prompt"
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "definition": {}
                                          },
                                          "required": [
                                            "connectionId",
                                            "connectionName",
                                            "cardUrl",
                                            "appName",
                                            "remoteIndex",
                                            "revision",
                                            "kind",
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "request": {},
                                        "operationId": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "source",
                                        "request"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Failed"
                                          ]
                                        },
                                        "source": {
                                          "type": "object",
                                          "properties": {
                                            "connectionId": {
                                              "type": "string"
                                            },
                                            "connectionName": {
                                              "type": "string"
                                            },
                                            "cardUrl": {
                                              "type": "string"
                                            },
                                            "appName": {
                                              "type": "string"
                                            },
                                            "remoteIndex": {
                                              "type": "integer",
                                              "minimum": 0,
                                              "maximum": 9007199254740991
                                            },
                                            "revision": {
                                              "type": "integer",
                                              "minimum": 0,
                                              "maximum": 9007199254740991
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "tool",
                                                "resource",
                                                "template",
                                                "prompt"
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "definition": {}
                                          },
                                          "required": [
                                            "connectionId",
                                            "connectionName",
                                            "cardUrl",
                                            "appName",
                                            "remoteIndex",
                                            "revision",
                                            "kind",
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "reason": {
                                          "type": "string"
                                        },
                                        "cause": {
                                          "type": "string"
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "result": {},
                                        "operationId": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "source",
                                        "reason",
                                        "message"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "session",
                            "turn",
                            "callId",
                            "toolName",
                            "source",
                            "arguments",
                            "readOnly",
                            "round",
                            "status",
                            "result"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "ticket",
                    "status",
                    "operation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AppViewUnavailable | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppViewUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-views/{viewId}/context": {
      "put": {
        "tags": [
          "App views"
        ],
        "operationId": "appViews.confirmContext",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "context": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "revision",
                    "context"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AppViewUnavailable | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppViewUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "context": {
                    "type": "object"
                  }
                },
                "required": [
                  "revision",
                  "context"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/app-operations/{operationId}/interaction": {
      "get": {
        "tags": [
          "App views"
        ],
        "operationId": "appViews.interaction",
        "parameters": [
          {
            "name": "operationId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "sessionId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "context": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "revision",
                    "context"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AppViewUnavailable | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppViewUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-views/{viewId}/messages": {
      "post": {
        "tags": [
          "App views"
        ],
        "operationId": "appViews.message",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "<No Content>"
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "AppViewUnavailable | SessionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppViewUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SessionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "object"
                  }
                },
                "required": [
                  "content"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/app-experience/export": {
      "get": {
        "tags": [
          "App transfer and reset"
        ],
        "operationId": "appExperience.export",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "format": {
                      "type": "string",
                      "enum": [
                        "openbot-apps-v1"
                      ]
                    },
                    "apps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "maxLength": 80
                          },
                          "cardUrl": {
                            "type": "string"
                          },
                          "remoteIndex": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "name",
                          "cardUrl",
                          "remoteIndex"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 30
                    }
                  },
                  "required": [
                    "format",
                    "apps"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-experience/import": {
      "post": {
        "tags": [
          "App transfer and reset"
        ],
        "operationId": "appExperience.import",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "entry": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "maxLength": 80
                              },
                              "cardUrl": {
                                "type": "string"
                              },
                              "remoteIndex": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "name",
                              "cardUrl",
                              "remoteIndex"
                            ],
                            "additionalProperties": false
                          },
                          "draft": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "revision": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "input": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "discovery": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "_tag": {
                                            "type": "string",
                                            "enum": [
                                              "Single"
                                            ]
                                          },
                                          "candidate": {
                                            "type": "object",
                                            "properties": {
                                              "cardUrl": {
                                                "type": "string"
                                              },
                                              "card": {
                                                "type": "object",
                                                "properties": {
                                                  "$schema": {
                                                    "type": "string",
                                                    "enum": [
                                                      "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                                    ]
                                                  },
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 2,
                                                    "maxLength": 200
                                                  },
                                                  "version": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 255
                                                  },
                                                  "description": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 100
                                                  },
                                                  "title": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 100
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "websiteUrl": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "repository": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "source": {
                                                            "type": "string"
                                                          },
                                                          "subfolder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "id": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "url",
                                                          "source"
                                                        ],
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "icons": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "src": {
                                                              "type": "string"
                                                            },
                                                            "mimeType": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "sizes": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "theme": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "light",
                                                                    "dark"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "src"
                                                          ],
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {}
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "remotes": {
                                                    "anyOf": [
                                                      {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "streamable-http",
                                                                "sse"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "headers": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "description": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "isRequired": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "boolean"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "isSecret": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "boolean"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "format": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "string",
                                                                              "number",
                                                                              "boolean",
                                                                              "filepath"
                                                                            ]
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "default": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "placeholder": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "choices": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "name": {
                                                                        "type": "string"
                                                                      },
                                                                      "variables": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "additionalProperties": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "description": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "string"
                                                                                    },
                                                                                    {
                                                                                      "type": "null"
                                                                                    }
                                                                                  ]
                                                                                },
                                                                                "isRequired": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "boolean"
                                                                                    },
                                                                                    {
                                                                                      "type": "null"
                                                                                    }
                                                                                  ]
                                                                                },
                                                                                "isSecret": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "boolean"
                                                                                    },
                                                                                    {
                                                                                      "type": "null"
                                                                                    }
                                                                                  ]
                                                                                },
                                                                                "format": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "string",
                                                                                      "enum": [
                                                                                        "string",
                                                                                        "number",
                                                                                        "boolean",
                                                                                        "filepath"
                                                                                      ]
                                                                                    },
                                                                                    {
                                                                                      "type": "null"
                                                                                    }
                                                                                  ]
                                                                                },
                                                                                "default": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "string"
                                                                                    },
                                                                                    {
                                                                                      "type": "null"
                                                                                    }
                                                                                  ]
                                                                                },
                                                                                "placeholder": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "string"
                                                                                    },
                                                                                    {
                                                                                      "type": "null"
                                                                                    }
                                                                                  ]
                                                                                },
                                                                                "value": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "string"
                                                                                    },
                                                                                    {
                                                                                      "type": "null"
                                                                                    }
                                                                                  ]
                                                                                },
                                                                                "choices": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "array",
                                                                                      "items": {
                                                                                        "type": "string"
                                                                                      }
                                                                                    },
                                                                                    {
                                                                                      "type": "null"
                                                                                    }
                                                                                  ]
                                                                                }
                                                                              },
                                                                              "allOf": [
                                                                                {
                                                                                  "type": "object",
                                                                                  "additionalProperties": {}
                                                                                }
                                                                              ]
                                                                            }
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "name"
                                                                    ],
                                                                    "allOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "variables": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "additionalProperties": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "description": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "isRequired": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "boolean"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "isSecret": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "boolean"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "format": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "string",
                                                                              "number",
                                                                              "boolean",
                                                                              "filepath"
                                                                            ]
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "default": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "placeholder": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "value": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "string"
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      },
                                                                      "choices": {
                                                                        "anyOf": [
                                                                          {
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          {
                                                                            "type": "null"
                                                                          }
                                                                        ]
                                                                      }
                                                                    },
                                                                    "allOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "supportedProtocolVersions": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ],
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {}
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "_meta": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "$schema",
                                                  "name",
                                                  "version",
                                                  "description"
                                                ],
                                                "allOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                ]
                                              },
                                              "endpoints": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "index": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 9007199254740991
                                                    },
                                                    "remote": {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "streamable-http",
                                                            "sse"
                                                          ]
                                                        },
                                                        "url": {
                                                          "type": "string"
                                                        },
                                                        "headers": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "description": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isRequired": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isSecret": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "format": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "filepath"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "default": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "placeholder": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "choices": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "name": {
                                                                    "type": "string"
                                                                  },
                                                                  "variables": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "additionalProperties": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "description": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "isRequired": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "boolean"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "isSecret": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "boolean"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "format": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "string",
                                                                                    "number",
                                                                                    "boolean",
                                                                                    "filepath"
                                                                                  ]
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "default": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "placeholder": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "value": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "string"
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            },
                                                                            "choices": {
                                                                              "anyOf": [
                                                                                {
                                                                                  "type": "array",
                                                                                  "items": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                {
                                                                                  "type": "null"
                                                                                }
                                                                              ]
                                                                            }
                                                                          },
                                                                          "allOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "additionalProperties": {}
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "name"
                                                                ],
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "variables": {
                                                          "anyOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "description": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isRequired": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isSecret": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "format": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "filepath"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "default": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "placeholder": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "choices": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "supportedProtocolVersions": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "url"
                                                      ],
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    },
                                                    "requirements": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "key": {
                                                            "type": "string"
                                                          },
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "type": "boolean"
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "key",
                                                          "isSecret"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "index",
                                                    "remote",
                                                    "requirements"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "sources": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "role": {
                                                      "type": "string",
                                                      "enum": [
                                                        "input",
                                                        "page",
                                                        "catalog",
                                                        "card",
                                                        "endpoint",
                                                        "manual"
                                                      ]
                                                    },
                                                    "url": {
                                                      "type": "string"
                                                    },
                                                    "originalInput": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "role",
                                                    "url"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              }
                                            },
                                            "required": [
                                              "cardUrl",
                                              "card",
                                              "endpoints",
                                              "sources"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "issues": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "url": {
                                                  "type": "string"
                                                },
                                                "reason": {
                                                  "type": "string"
                                                },
                                                "fieldPath": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "url",
                                                "reason"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "required": [
                                          "_tag",
                                          "candidate",
                                          "issues"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "_tag": {
                                            "type": "string",
                                            "enum": [
                                              "Multiple"
                                            ]
                                          },
                                          "candidates": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "cardUrl": {
                                                  "type": "string"
                                                },
                                                "card": {
                                                  "type": "object",
                                                  "properties": {
                                                    "$schema": {
                                                      "type": "string",
                                                      "enum": [
                                                        "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string",
                                                      "minLength": 2,
                                                      "maxLength": 200
                                                    },
                                                    "version": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 255
                                                    },
                                                    "description": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 100
                                                    },
                                                    "title": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 100
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "websiteUrl": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "repository": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "source": {
                                                              "type": "string"
                                                            },
                                                            "subfolder": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "id": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url",
                                                            "source"
                                                          ],
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {}
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "icons": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "src": {
                                                                "type": "string"
                                                              },
                                                              "mimeType": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "sizes": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "theme": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "light",
                                                                      "dark"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "src"
                                                            ],
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "remotes": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "streamable-http",
                                                                  "sse"
                                                                ]
                                                              },
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "headers": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "description": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "isRequired": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "boolean"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "isSecret": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "boolean"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "format": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "string",
                                                                                "number",
                                                                                "boolean",
                                                                                "filepath"
                                                                              ]
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "default": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "placeholder": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "choices": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string"
                                                                              }
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "name": {
                                                                          "type": "string"
                                                                        },
                                                                        "variables": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "additionalProperties": {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "description": {
                                                                                    "anyOf": [
                                                                                      {
                                                                                        "type": "string"
                                                                                      },
                                                                                      {
                                                                                        "type": "null"
                                                                                      }
                                                                                    ]
                                                                                  },
                                                                                  "isRequired": {
                                                                                    "anyOf": [
                                                                                      {
                                                                                        "type": "boolean"
                                                                                      },
                                                                                      {
                                                                                        "type": "null"
                                                                                      }
                                                                                    ]
                                                                                  },
                                                                                  "isSecret": {
                                                                                    "anyOf": [
                                                                                      {
                                                                                        "type": "boolean"
                                                                                      },
                                                                                      {
                                                                                        "type": "null"
                                                                                      }
                                                                                    ]
                                                                                  },
                                                                                  "format": {
                                                                                    "anyOf": [
                                                                                      {
                                                                                        "type": "string",
                                                                                        "enum": [
                                                                                          "string",
                                                                                          "number",
                                                                                          "boolean",
                                                                                          "filepath"
                                                                                        ]
                                                                                      },
                                                                                      {
                                                                                        "type": "null"
                                                                                      }
                                                                                    ]
                                                                                  },
                                                                                  "default": {
                                                                                    "anyOf": [
                                                                                      {
                                                                                        "type": "string"
                                                                                      },
                                                                                      {
                                                                                        "type": "null"
                                                                                      }
                                                                                    ]
                                                                                  },
                                                                                  "placeholder": {
                                                                                    "anyOf": [
                                                                                      {
                                                                                        "type": "string"
                                                                                      },
                                                                                      {
                                                                                        "type": "null"
                                                                                      }
                                                                                    ]
                                                                                  },
                                                                                  "value": {
                                                                                    "anyOf": [
                                                                                      {
                                                                                        "type": "string"
                                                                                      },
                                                                                      {
                                                                                        "type": "null"
                                                                                      }
                                                                                    ]
                                                                                  },
                                                                                  "choices": {
                                                                                    "anyOf": [
                                                                                      {
                                                                                        "type": "array",
                                                                                        "items": {
                                                                                          "type": "string"
                                                                                        }
                                                                                      },
                                                                                      {
                                                                                        "type": "null"
                                                                                      }
                                                                                    ]
                                                                                  }
                                                                                },
                                                                                "allOf": [
                                                                                  {
                                                                                    "type": "object",
                                                                                    "additionalProperties": {}
                                                                                  }
                                                                                ]
                                                                              }
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "name"
                                                                      ],
                                                                      "allOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "additionalProperties": {}
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "variables": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "description": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "isRequired": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "boolean"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "isSecret": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "boolean"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "format": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string",
                                                                              "enum": [
                                                                                "string",
                                                                                "number",
                                                                                "boolean",
                                                                                "filepath"
                                                                              ]
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "default": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "placeholder": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "value": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        },
                                                                        "choices": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "array",
                                                                              "items": {
                                                                                "type": "string"
                                                                              }
                                                                            },
                                                                            {
                                                                              "type": "null"
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      "allOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "additionalProperties": {}
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "supportedProtocolVersions": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "url"
                                                            ],
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "_meta": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "$schema",
                                                    "name",
                                                    "version",
                                                    "description"
                                                  ],
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                },
                                                "endpoints": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "index": {
                                                        "type": "integer",
                                                        "minimum": 0,
                                                        "maximum": 9007199254740991
                                                      },
                                                      "remote": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "streamable-http",
                                                              "sse"
                                                            ]
                                                          },
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "headers": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "description": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isRequired": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isSecret": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "format": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "string",
                                                                            "number",
                                                                            "boolean",
                                                                            "filepath"
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "default": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "placeholder": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "choices": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "name": {
                                                                      "type": "string"
                                                                    },
                                                                    "variables": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "object",
                                                                          "additionalProperties": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "description": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "string"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "isRequired": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "boolean"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "isSecret": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "boolean"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "format": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "string",
                                                                                      "number",
                                                                                      "boolean",
                                                                                      "filepath"
                                                                                    ]
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "default": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "string"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "placeholder": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "string"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "value": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "string"
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              },
                                                                              "choices": {
                                                                                "anyOf": [
                                                                                  {
                                                                                    "type": "array",
                                                                                    "items": {
                                                                                      "type": "string"
                                                                                    }
                                                                                  },
                                                                                  {
                                                                                    "type": "null"
                                                                                  }
                                                                                ]
                                                                              }
                                                                            },
                                                                            "allOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "additionalProperties": {}
                                                                              }
                                                                            ]
                                                                          }
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "name"
                                                                  ],
                                                                  "allOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "additionalProperties": {}
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "variables": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "description": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isRequired": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isSecret": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "format": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "string",
                                                                            "number",
                                                                            "boolean",
                                                                            "filepath"
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "default": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "placeholder": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "choices": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "allOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "additionalProperties": {}
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "supportedProtocolVersions": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      },
                                                      "requirements": {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "key": {
                                                              "type": "string"
                                                            },
                                                            "description": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "isSecret": {
                                                              "type": "boolean"
                                                            },
                                                            "format": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            },
                                                            "choices": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                {
                                                                  "type": "null"
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "key",
                                                            "isSecret"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "index",
                                                      "remote",
                                                      "requirements"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "sources": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "role": {
                                                        "type": "string",
                                                        "enum": [
                                                          "input",
                                                          "page",
                                                          "catalog",
                                                          "card",
                                                          "endpoint",
                                                          "manual"
                                                        ]
                                                      },
                                                      "url": {
                                                        "type": "string"
                                                      },
                                                      "originalInput": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "role",
                                                      "url"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                }
                                              },
                                              "required": [
                                                "cardUrl",
                                                "card",
                                                "endpoints",
                                                "sources"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "minItems": 2
                                          },
                                          "issues": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "url": {
                                                  "type": "string"
                                                },
                                                "reason": {
                                                  "type": "string"
                                                },
                                                "fieldPath": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "url",
                                                "reason"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "required": [
                                          "_tag",
                                          "candidates",
                                          "issues"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  "expiresAt": {
                                    "type": "number"
                                  },
                                  "imported": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "maxLength": 80
                                      },
                                      "remoteIndex": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "remoteIndex"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "id",
                                  "revision",
                                  "input",
                                  "discovery",
                                  "expiresAt"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "error": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "entry",
                          "draft",
                          "error"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "entries"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string",
                    "enum": [
                      "openbot-apps-v1"
                    ]
                  },
                  "apps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "cardUrl": {
                          "type": "string"
                        },
                        "remoteIndex": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "name",
                        "cardUrl",
                        "remoteIndex"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 30
                  }
                },
                "required": [
                  "format",
                  "apps"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/app-experience/reset": {
      "post": {
        "tags": [
          "App transfer and reset"
        ],
        "operationId": "appExperience.reset",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "removed": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "pending": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "stage": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "stage"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "removed",
                    "pending"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/manual": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.createManualConnection",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "cardUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "card": {
                      "type": "object",
                      "properties": {
                        "$schema": {
                          "type": "string",
                          "enum": [
                            "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 200
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "websiteUrl": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repository": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string"
                                },
                                "subfolder": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "url",
                                "source"
                              ],
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "icons": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "src": {
                                    "type": "string"
                                  },
                                  "mimeType": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "sizes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "theme": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "light",
                                          "dark"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "src"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "remotes": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "_meta": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "$schema",
                        "name",
                        "version",
                        "description"
                      ],
                      "allOf": [
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    },
                    "endpoint": {
                      "type": "string"
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role": {
                            "type": "string",
                            "enum": [
                              "input",
                              "page",
                              "catalog",
                              "card",
                              "endpoint",
                              "manual"
                            ]
                          },
                          "url": {
                            "type": "string"
                          },
                          "originalInput": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "role",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "configuration": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingConfiguration"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingAuthorization"
                              ]
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "scopes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Unverified"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Available"
                              ]
                            },
                            "checkedAt": {
                              "type": "number"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "_tag",
                            "checkedAt",
                            "revision"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AuthorizationExpired"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "ConnectionFailed"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "NeedsRevalidation"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "CleanupPending"
                              ]
                            },
                            "stage": {
                              "type": "string",
                              "enum": [
                                "Credentials",
                                "Connection"
                              ]
                            }
                          },
                          "required": [
                            "_tag",
                            "stage"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Restricted"
                              ]
                            },
                            "restriction": {
                              "type": "object",
                              "properties": {
                                "cardUrl": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "appealUrl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "cardUrl",
                                "reason",
                                "appealUrl"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "_tag",
                            "restriction"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "cardUrl",
                    "card",
                    "endpoint",
                    "remoteIndex",
                    "sources",
                    "configuration",
                    "enabled",
                    "revision",
                    "availability"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "url": {
                    "type": "string"
                  },
                  "transport": {
                    "type": "string",
                    "enum": [
                      "streamable-http"
                    ]
                  },
                  "headers": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "id",
                  "name",
                  "url",
                  "transport",
                  "headers"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/connections/{connectionId}/manual": {
      "put": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.updateManualConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "cardUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "card": {
                      "type": "object",
                      "properties": {
                        "$schema": {
                          "type": "string",
                          "enum": [
                            "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 200
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "websiteUrl": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repository": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string"
                                },
                                "subfolder": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "url",
                                "source"
                              ],
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "icons": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "src": {
                                    "type": "string"
                                  },
                                  "mimeType": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "sizes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "theme": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "light",
                                          "dark"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "src"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "remotes": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "_meta": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "$schema",
                        "name",
                        "version",
                        "description"
                      ],
                      "allOf": [
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    },
                    "endpoint": {
                      "type": "string"
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role": {
                            "type": "string",
                            "enum": [
                              "input",
                              "page",
                              "catalog",
                              "card",
                              "endpoint",
                              "manual"
                            ]
                          },
                          "url": {
                            "type": "string"
                          },
                          "originalInput": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "role",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "configuration": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingConfiguration"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingAuthorization"
                              ]
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "scopes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Unverified"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Available"
                              ]
                            },
                            "checkedAt": {
                              "type": "number"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "_tag",
                            "checkedAt",
                            "revision"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AuthorizationExpired"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "ConnectionFailed"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "NeedsRevalidation"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "CleanupPending"
                              ]
                            },
                            "stage": {
                              "type": "string",
                              "enum": [
                                "Credentials",
                                "Connection"
                              ]
                            }
                          },
                          "required": [
                            "_tag",
                            "stage"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Restricted"
                              ]
                            },
                            "restriction": {
                              "type": "object",
                              "properties": {
                                "cardUrl": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "appealUrl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "cardUrl",
                                "reason",
                                "appealUrl"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "_tag",
                            "restriction"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "cardUrl",
                    "card",
                    "endpoint",
                    "remoteIndex",
                    "sources",
                    "configuration",
                    "enabled",
                    "revision",
                    "availability"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "url": {
                    "type": "string"
                  },
                  "transport": {
                    "type": "string",
                    "enum": [
                      "streamable-http"
                    ]
                  },
                  "headers": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "revision",
                  "name",
                  "url",
                  "transport",
                  "headers"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/connections/{connectionId}/verify": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.verifyConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "_tag": {
                          "type": "string",
                          "enum": [
                            "Verified"
                          ]
                        },
                        "capabilities": {
                          "type": "object",
                          "properties": {
                            "connection": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string",
                                  "maxLength": 80
                                },
                                "cardUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "string"
                                    }
                                  ]
                                },
                                "card": {
                                  "type": "object",
                                  "properties": {
                                    "$schema": {
                                      "type": "string",
                                      "enum": [
                                        "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                      ]
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 2,
                                      "maxLength": 200
                                    },
                                    "version": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "description": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 100
                                    },
                                    "title": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "websiteUrl": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "repository": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "url": {
                                              "type": "string"
                                            },
                                            "source": {
                                              "type": "string"
                                            },
                                            "subfolder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "id": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "url",
                                            "source"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "icons": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "src": {
                                                "type": "string"
                                              },
                                              "mimeType": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "sizes": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "theme": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "light",
                                                      "dark"
                                                    ]
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "src"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "remotes": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "streamable-http",
                                                  "sse"
                                                ]
                                              },
                                              "url": {
                                                "type": "string"
                                              },
                                              "headers": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "description": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isRequired": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isSecret": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "format": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "string",
                                                                "number",
                                                                "boolean",
                                                                "filepath"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "default": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "placeholder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "choices": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "variables": {
                                                          "anyOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "description": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isRequired": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isSecret": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "format": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "filepath"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "default": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "placeholder": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "choices": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "name"
                                                      ],
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "variables": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                      "type": "object",
                                                      "properties": {
                                                        "description": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isRequired": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isSecret": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "format": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "string",
                                                                "number",
                                                                "boolean",
                                                                "filepath"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "default": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "placeholder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "choices": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "supportedProtocolVersions": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "_meta": {
                                      "anyOf": [
                                        {
                                          "type": "object"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "$schema",
                                    "name",
                                    "version",
                                    "description"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                "endpoint": {
                                  "type": "string"
                                },
                                "remoteIndex": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "sources": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "role": {
                                        "type": "string",
                                        "enum": [
                                          "input",
                                          "page",
                                          "catalog",
                                          "card",
                                          "endpoint",
                                          "manual"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "originalInput": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "role",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "configuration": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "enabled": {
                                  "type": "boolean"
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "availability": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "PendingConfiguration"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "PendingAuthorization"
                                          ]
                                        },
                                        "scopes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "scopes"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Unverified"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Available"
                                          ]
                                        },
                                        "checkedAt": {
                                          "type": "number"
                                        },
                                        "revision": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "checkedAt",
                                        "revision"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "AuthorizationExpired"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "ConnectionFailed"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "message"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "NeedsRevalidation"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "CleanupPending"
                                          ]
                                        },
                                        "stage": {
                                          "type": "string",
                                          "enum": [
                                            "Credentials",
                                            "Connection"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "stage"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "_tag": {
                                          "type": "string",
                                          "enum": [
                                            "Restricted"
                                          ]
                                        },
                                        "restriction": {
                                          "type": "object",
                                          "properties": {
                                            "cardUrl": {
                                              "type": "string"
                                            },
                                            "reason": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "appealUrl": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "cardUrl",
                                            "reason",
                                            "appealUrl"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "_tag",
                                        "restriction"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "cardUrl",
                                "card",
                                "endpoint",
                                "remoteIndex",
                                "sources",
                                "configuration",
                                "enabled",
                                "revision",
                                "availability"
                              ],
                              "additionalProperties": false
                            },
                            "protocolVersion": {
                              "type": "string"
                            },
                            "tools": {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            },
                            "resources": {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            },
                            "resourceTemplates": {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            },
                            "prompts": {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            }
                          },
                          "required": [
                            "connection",
                            "protocolVersion",
                            "tools",
                            "resources",
                            "resourceTemplates",
                            "prompts"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "_tag",
                        "capabilities"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_tag": {
                          "type": "string",
                          "enum": [
                            "Unavailable"
                          ]
                        },
                        "connection": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string",
                              "maxLength": 80
                            },
                            "cardUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "card": {
                              "type": "object",
                              "properties": {
                                "$schema": {
                                  "type": "string",
                                  "enum": [
                                    "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 2,
                                  "maxLength": 200
                                },
                                "version": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "description": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                "title": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 100
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "websiteUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "repository": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "url": {
                                          "type": "string"
                                        },
                                        "source": {
                                          "type": "string"
                                        },
                                        "subfolder": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "id": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "url",
                                        "source"
                                      ],
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {}
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "icons": {
                                  "anyOf": [
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "src": {
                                            "type": "string"
                                          },
                                          "mimeType": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "sizes": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "theme": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "light",
                                                  "dark"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "src"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "remotes": {
                                  "anyOf": [
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "streamable-http",
                                              "sse"
                                            ]
                                          },
                                          "url": {
                                            "type": "string"
                                          },
                                          "headers": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "description": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isRequired": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isSecret": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "format": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "string",
                                                            "number",
                                                            "boolean",
                                                            "filepath"
                                                          ]
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "default": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "placeholder": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "choices": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "variables": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {
                                                            "type": "object",
                                                            "properties": {
                                                              "description": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isRequired": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isSecret": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "format": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "string",
                                                                      "number",
                                                                      "boolean",
                                                                      "filepath"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "default": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "placeholder": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "choices": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "variables": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {
                                                  "type": "object",
                                                  "properties": {
                                                    "description": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isRequired": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isSecret": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "format": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "string",
                                                            "number",
                                                            "boolean",
                                                            "filepath"
                                                          ]
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "default": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "placeholder": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "choices": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "supportedProtocolVersions": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "url"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "_meta": {
                                  "anyOf": [
                                    {
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "$schema",
                                "name",
                                "version",
                                "description"
                              ],
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              ]
                            },
                            "endpoint": {
                              "type": "string"
                            },
                            "remoteIndex": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "input",
                                      "page",
                                      "catalog",
                                      "card",
                                      "endpoint",
                                      "manual"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "originalInput": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "role",
                                  "url"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "configuration": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              }
                            },
                            "enabled": {
                              "type": "boolean"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "availability": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "PendingConfiguration"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "_tag"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "PendingAuthorization"
                                      ]
                                    },
                                    "scopes": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "scopes"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Unverified"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "_tag"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Available"
                                      ]
                                    },
                                    "checkedAt": {
                                      "type": "number"
                                    },
                                    "revision": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "checkedAt",
                                    "revision"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "AuthorizationExpired"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "_tag"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "ConnectionFailed"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "NeedsRevalidation"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "_tag"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "CleanupPending"
                                      ]
                                    },
                                    "stage": {
                                      "type": "string",
                                      "enum": [
                                        "Credentials",
                                        "Connection"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "stage"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "_tag": {
                                      "type": "string",
                                      "enum": [
                                        "Restricted"
                                      ]
                                    },
                                    "restriction": {
                                      "type": "object",
                                      "properties": {
                                        "cardUrl": {
                                          "type": "string"
                                        },
                                        "reason": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "appealUrl": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "cardUrl",
                                        "reason",
                                        "appealUrl"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "_tag",
                                    "restriction"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "cardUrl",
                            "card",
                            "endpoint",
                            "remoteIndex",
                            "sources",
                            "configuration",
                            "enabled",
                            "revision",
                            "availability"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "_tag",
                        "connection"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{connectionId}/refresh": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.refreshConnectionAuthorization",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "cardUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "card": {
                      "type": "object",
                      "properties": {
                        "$schema": {
                          "type": "string",
                          "enum": [
                            "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 200
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "websiteUrl": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repository": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string"
                                },
                                "subfolder": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "url",
                                "source"
                              ],
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "icons": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "src": {
                                    "type": "string"
                                  },
                                  "mimeType": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "sizes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "theme": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "light",
                                          "dark"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "src"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "remotes": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "_meta": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "$schema",
                        "name",
                        "version",
                        "description"
                      ],
                      "allOf": [
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    },
                    "endpoint": {
                      "type": "string"
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role": {
                            "type": "string",
                            "enum": [
                              "input",
                              "page",
                              "catalog",
                              "card",
                              "endpoint",
                              "manual"
                            ]
                          },
                          "url": {
                            "type": "string"
                          },
                          "originalInput": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "role",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "configuration": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingConfiguration"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingAuthorization"
                              ]
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "scopes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Unverified"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Available"
                              ]
                            },
                            "checkedAt": {
                              "type": "number"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "_tag",
                            "checkedAt",
                            "revision"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AuthorizationExpired"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "ConnectionFailed"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "NeedsRevalidation"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "CleanupPending"
                              ]
                            },
                            "stage": {
                              "type": "string",
                              "enum": [
                                "Credentials",
                                "Connection"
                              ]
                            }
                          },
                          "required": [
                            "_tag",
                            "stage"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Restricted"
                              ]
                            },
                            "restriction": {
                              "type": "object",
                              "properties": {
                                "cardUrl": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "appealUrl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "cardUrl",
                                "reason",
                                "appealUrl"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "_tag",
                            "restriction"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "cardUrl",
                    "card",
                    "endpoint",
                    "remoteIndex",
                    "sources",
                    "configuration",
                    "enabled",
                    "revision",
                    "availability"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{connectionId}/revalidate": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.revalidateConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "cardUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "card": {
                      "type": "object",
                      "properties": {
                        "$schema": {
                          "type": "string",
                          "enum": [
                            "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 200
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "websiteUrl": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repository": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string"
                                },
                                "subfolder": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "url",
                                "source"
                              ],
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "icons": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "src": {
                                    "type": "string"
                                  },
                                  "mimeType": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "sizes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "theme": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "light",
                                          "dark"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "src"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "remotes": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "_meta": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "$schema",
                        "name",
                        "version",
                        "description"
                      ],
                      "allOf": [
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    },
                    "endpoint": {
                      "type": "string"
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role": {
                            "type": "string",
                            "enum": [
                              "input",
                              "page",
                              "catalog",
                              "card",
                              "endpoint",
                              "manual"
                            ]
                          },
                          "url": {
                            "type": "string"
                          },
                          "originalInput": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "role",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "configuration": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingConfiguration"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingAuthorization"
                              ]
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "scopes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Unverified"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Available"
                              ]
                            },
                            "checkedAt": {
                              "type": "number"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "_tag",
                            "checkedAt",
                            "revision"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AuthorizationExpired"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "ConnectionFailed"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "NeedsRevalidation"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "CleanupPending"
                              ]
                            },
                            "stage": {
                              "type": "string",
                              "enum": [
                                "Credentials",
                                "Connection"
                              ]
                            }
                          },
                          "required": [
                            "_tag",
                            "stage"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Restricted"
                              ]
                            },
                            "restriction": {
                              "type": "object",
                              "properties": {
                                "cardUrl": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "appealUrl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "cardUrl",
                                "reason",
                                "appealUrl"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "_tag",
                            "restriction"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "cardUrl",
                    "card",
                    "endpoint",
                    "remoteIndex",
                    "sources",
                    "configuration",
                    "enabled",
                    "revision",
                    "availability"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "draftId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "remoteIndex": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "values": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "confirmed": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                },
                "required": [
                  "revision",
                  "draftId",
                  "remoteIndex",
                  "values",
                  "confirmed"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/connections": {
      "get": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.listConnections",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 80
                      },
                      "cardUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "card": {
                        "type": "object",
                        "properties": {
                          "$schema": {
                            "type": "string",
                            "enum": [
                              "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                            ]
                          },
                          "name": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 200
                          },
                          "version": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "description": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "title": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "websiteUrl": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "repository": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string"
                                  },
                                  "source": {
                                    "type": "string"
                                  },
                                  "subfolder": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "id": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "url",
                                  "source"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "icons": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "src": {
                                      "type": "string"
                                    },
                                    "mimeType": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "sizes": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "theme": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "light",
                                            "dark"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "src"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "remotes": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "streamable-http",
                                        "sse"
                                      ]
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "description": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isRequired": {
                                                "anyOf": [
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isSecret": {
                                                "anyOf": [
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "format": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "string",
                                                      "number",
                                                      "boolean",
                                                      "filepath"
                                                    ]
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "default": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "placeholder": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "choices": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "name": {
                                                "type": "string"
                                              },
                                              "variables": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                      "type": "object",
                                                      "properties": {
                                                        "description": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isRequired": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isSecret": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "format": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "string",
                                                                "number",
                                                                "boolean",
                                                                "filepath"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "default": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "placeholder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "choices": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "variables": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {
                                            "type": "object",
                                            "properties": {
                                              "description": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isRequired": {
                                                "anyOf": [
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isSecret": {
                                                "anyOf": [
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "format": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "string",
                                                      "number",
                                                      "boolean",
                                                      "filepath"
                                                    ]
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "default": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "placeholder": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "choices": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "supportedProtocolVersions": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "url"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "_meta": {
                            "anyOf": [
                              {
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "$schema",
                          "name",
                          "version",
                          "description"
                        ],
                        "allOf": [
                          {
                            "type": "object",
                            "additionalProperties": {}
                          }
                        ]
                      },
                      "endpoint": {
                        "type": "string"
                      },
                      "remoteIndex": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "sources": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "input",
                                "page",
                                "catalog",
                                "card",
                                "endpoint",
                                "manual"
                              ]
                            },
                            "url": {
                              "type": "string"
                            },
                            "originalInput": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "role",
                            "url"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "configuration": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "revision": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "availability": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "PendingConfiguration"
                                ]
                              }
                            },
                            "required": [
                              "_tag"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "PendingAuthorization"
                                ]
                              },
                              "scopes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "_tag",
                              "scopes"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Unverified"
                                ]
                              }
                            },
                            "required": [
                              "_tag"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Available"
                                ]
                              },
                              "checkedAt": {
                                "type": "number"
                              },
                              "revision": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "_tag",
                              "checkedAt",
                              "revision"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "AuthorizationExpired"
                                ]
                              }
                            },
                            "required": [
                              "_tag"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "ConnectionFailed"
                                ]
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "_tag",
                              "message"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "NeedsRevalidation"
                                ]
                              }
                            },
                            "required": [
                              "_tag"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "CleanupPending"
                                ]
                              },
                              "stage": {
                                "type": "string",
                                "enum": [
                                  "Credentials",
                                  "Connection"
                                ]
                              }
                            },
                            "required": [
                              "_tag",
                              "stage"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "_tag": {
                                "type": "string",
                                "enum": [
                                  "Restricted"
                                ]
                              },
                              "restriction": {
                                "type": "object",
                                "properties": {
                                  "cardUrl": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "appealUrl": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "cardUrl",
                                  "reason",
                                  "appealUrl"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "_tag",
                              "restriction"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "cardUrl",
                      "card",
                      "endpoint",
                      "remoteIndex",
                      "sources",
                      "configuration",
                      "enabled",
                      "revision",
                      "availability"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.createConnection",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "cardUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "card": {
                      "type": "object",
                      "properties": {
                        "$schema": {
                          "type": "string",
                          "enum": [
                            "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 200
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "websiteUrl": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repository": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string"
                                },
                                "subfolder": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "url",
                                "source"
                              ],
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "icons": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "src": {
                                    "type": "string"
                                  },
                                  "mimeType": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "sizes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "theme": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "light",
                                          "dark"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "src"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "remotes": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "_meta": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "$schema",
                        "name",
                        "version",
                        "description"
                      ],
                      "allOf": [
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    },
                    "endpoint": {
                      "type": "string"
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role": {
                            "type": "string",
                            "enum": [
                              "input",
                              "page",
                              "catalog",
                              "card",
                              "endpoint",
                              "manual"
                            ]
                          },
                          "url": {
                            "type": "string"
                          },
                          "originalInput": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "role",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "configuration": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingConfiguration"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingAuthorization"
                              ]
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "scopes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Unverified"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Available"
                              ]
                            },
                            "checkedAt": {
                              "type": "number"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "_tag",
                            "checkedAt",
                            "revision"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AuthorizationExpired"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "ConnectionFailed"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "NeedsRevalidation"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "CleanupPending"
                              ]
                            },
                            "stage": {
                              "type": "string",
                              "enum": [
                                "Credentials",
                                "Connection"
                              ]
                            }
                          },
                          "required": [
                            "_tag",
                            "stage"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Restricted"
                              ]
                            },
                            "restriction": {
                              "type": "object",
                              "properties": {
                                "cardUrl": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "appealUrl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "cardUrl",
                                "reason",
                                "appealUrl"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "_tag",
                            "restriction"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "cardUrl",
                    "card",
                    "endpoint",
                    "remoteIndex",
                    "sources",
                    "configuration",
                    "enabled",
                    "revision",
                    "availability"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "draftId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "cardUrl": {
                    "type": "string"
                  },
                  "remoteIndex": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "values": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "confirmed": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                },
                "required": [
                  "draftId",
                  "revision",
                  "cardUrl",
                  "remoteIndex",
                  "name",
                  "values",
                  "confirmed"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/connection-drafts": {
      "post": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.prepareConnection",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "input": {
                      "type": "string",
                      "minLength": 1
                    },
                    "discovery": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Single"
                              ]
                            },
                            "candidate": {
                              "type": "object",
                              "properties": {
                                "cardUrl": {
                                  "type": "string"
                                },
                                "card": {
                                  "type": "object",
                                  "properties": {
                                    "$schema": {
                                      "type": "string",
                                      "enum": [
                                        "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                      ]
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 2,
                                      "maxLength": 200
                                    },
                                    "version": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "description": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 100
                                    },
                                    "title": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "websiteUrl": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "repository": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "url": {
                                              "type": "string"
                                            },
                                            "source": {
                                              "type": "string"
                                            },
                                            "subfolder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "id": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "url",
                                            "source"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "icons": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "src": {
                                                "type": "string"
                                              },
                                              "mimeType": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "sizes": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "theme": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "light",
                                                      "dark"
                                                    ]
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "src"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "remotes": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "streamable-http",
                                                  "sse"
                                                ]
                                              },
                                              "url": {
                                                "type": "string"
                                              },
                                              "headers": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "description": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isRequired": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isSecret": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "format": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "string",
                                                                "number",
                                                                "boolean",
                                                                "filepath"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "default": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "placeholder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "choices": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "variables": {
                                                          "anyOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "description": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isRequired": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isSecret": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "format": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "filepath"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "default": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "placeholder": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "choices": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "name"
                                                      ],
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "variables": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                      "type": "object",
                                                      "properties": {
                                                        "description": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isRequired": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isSecret": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "format": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "string",
                                                                "number",
                                                                "boolean",
                                                                "filepath"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "default": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "placeholder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "choices": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "supportedProtocolVersions": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "_meta": {
                                      "anyOf": [
                                        {
                                          "type": "object"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "$schema",
                                    "name",
                                    "version",
                                    "description"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                "endpoints": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "index": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "remote": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "streamable-http",
                                              "sse"
                                            ]
                                          },
                                          "url": {
                                            "type": "string"
                                          },
                                          "headers": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "description": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isRequired": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isSecret": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "format": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "string",
                                                            "number",
                                                            "boolean",
                                                            "filepath"
                                                          ]
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "default": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "placeholder": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "choices": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "variables": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {
                                                            "type": "object",
                                                            "properties": {
                                                              "description": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isRequired": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isSecret": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "format": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "string",
                                                                      "number",
                                                                      "boolean",
                                                                      "filepath"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "default": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "placeholder": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "choices": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "variables": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {
                                                  "type": "object",
                                                  "properties": {
                                                    "description": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isRequired": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isSecret": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "format": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "string",
                                                            "number",
                                                            "boolean",
                                                            "filepath"
                                                          ]
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "default": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "placeholder": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "choices": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "supportedProtocolVersions": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "url"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      },
                                      "requirements": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "key": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "type": "boolean"
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "key",
                                            "isSecret"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "required": [
                                      "index",
                                      "remote",
                                      "requirements"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "sources": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "role": {
                                        "type": "string",
                                        "enum": [
                                          "input",
                                          "page",
                                          "catalog",
                                          "card",
                                          "endpoint",
                                          "manual"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "originalInput": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "role",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "cardUrl",
                                "card",
                                "endpoints",
                                "sources"
                              ],
                              "additionalProperties": false
                            },
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string"
                                  },
                                  "fieldPath": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "url",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "candidate",
                            "issues"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Multiple"
                              ]
                            },
                            "candidates": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cardUrl": {
                                    "type": "string"
                                  },
                                  "card": {
                                    "type": "object",
                                    "properties": {
                                      "$schema": {
                                        "type": "string",
                                        "enum": [
                                          "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 2,
                                        "maxLength": 200
                                      },
                                      "version": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "description": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 100
                                      },
                                      "title": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 100
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "websiteUrl": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "repository": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "source": {
                                                "type": "string"
                                              },
                                              "subfolder": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "id": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url",
                                              "source"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "icons": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "src": {
                                                  "type": "string"
                                                },
                                                "mimeType": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "sizes": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "theme": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "light",
                                                        "dark"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "src"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "remotes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "streamable-http",
                                                    "sse"
                                                  ]
                                                },
                                                "url": {
                                                  "type": "string"
                                                },
                                                "headers": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "variables": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "description": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isRequired": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isSecret": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "format": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "string",
                                                                            "number",
                                                                            "boolean",
                                                                            "filepath"
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "default": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "placeholder": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "choices": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "allOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "additionalProperties": {}
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "name"
                                                        ],
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "supportedProtocolVersions": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "url"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "_meta": {
                                        "anyOf": [
                                          {
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "$schema",
                                      "name",
                                      "version",
                                      "description"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  },
                                  "endpoints": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "index": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "remote": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "streamable-http",
                                                "sse"
                                              ]
                                            },
                                            "url": {
                                              "type": "string"
                                            },
                                            "headers": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "name": {
                                                        "type": "string"
                                                      },
                                                      "variables": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isRequired": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isSecret": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "format": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "string",
                                                                        "number",
                                                                        "boolean",
                                                                        "filepath"
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "default": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "placeholder": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "value": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "choices": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "allOf": [
                                                                {
                                                                  "type": "object",
                                                                  "additionalProperties": {}
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "name"
                                                    ],
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "supportedProtocolVersions": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        },
                                        "requirements": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "key": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isSecret": {
                                                "type": "boolean"
                                              },
                                              "format": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "choices": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "key",
                                              "isSecret"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "index",
                                        "remote",
                                        "requirements"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "sources": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "type": "string",
                                          "enum": [
                                            "input",
                                            "page",
                                            "catalog",
                                            "card",
                                            "endpoint",
                                            "manual"
                                          ]
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "originalInput": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "cardUrl",
                                  "card",
                                  "endpoints",
                                  "sources"
                                ],
                                "additionalProperties": false
                              },
                              "minItems": 2
                            },
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string"
                                  },
                                  "fieldPath": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "url",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "candidates",
                            "issues"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "imported": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "remoteIndex": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "name",
                        "remoteIndex"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "revision",
                    "input",
                    "discovery",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "input"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/connection-drafts/{draftId}": {
      "get": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.getConnectionDraft",
        "parameters": [
          {
            "name": "draftId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "input": {
                      "type": "string",
                      "minLength": 1
                    },
                    "discovery": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Single"
                              ]
                            },
                            "candidate": {
                              "type": "object",
                              "properties": {
                                "cardUrl": {
                                  "type": "string"
                                },
                                "card": {
                                  "type": "object",
                                  "properties": {
                                    "$schema": {
                                      "type": "string",
                                      "enum": [
                                        "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                      ]
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 2,
                                      "maxLength": 200
                                    },
                                    "version": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "description": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 100
                                    },
                                    "title": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "websiteUrl": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "repository": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "url": {
                                              "type": "string"
                                            },
                                            "source": {
                                              "type": "string"
                                            },
                                            "subfolder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "id": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "url",
                                            "source"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "icons": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "src": {
                                                "type": "string"
                                              },
                                              "mimeType": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "sizes": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "theme": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "light",
                                                      "dark"
                                                    ]
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "src"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "remotes": {
                                      "anyOf": [
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "streamable-http",
                                                  "sse"
                                                ]
                                              },
                                              "url": {
                                                "type": "string"
                                              },
                                              "headers": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "description": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isRequired": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isSecret": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "format": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "string",
                                                                "number",
                                                                "boolean",
                                                                "filepath"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "default": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "placeholder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "choices": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "variables": {
                                                          "anyOf": [
                                                            {
                                                              "type": "object",
                                                              "additionalProperties": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "description": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isRequired": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "isSecret": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "boolean"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "format": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "filepath"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "default": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "placeholder": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "value": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  },
                                                                  "choices": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      {
                                                                        "type": "null"
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "name"
                                                      ],
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "variables": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                      "type": "object",
                                                      "properties": {
                                                        "description": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isRequired": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "isSecret": {
                                                          "anyOf": [
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "format": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "string",
                                                                "number",
                                                                "boolean",
                                                                "filepath"
                                                              ]
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "default": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "placeholder": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "choices": {
                                                          "anyOf": [
                                                            {
                                                              "type": "array",
                                                              "items": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "allOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "supportedProtocolVersions": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "_meta": {
                                      "anyOf": [
                                        {
                                          "type": "object"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "$schema",
                                    "name",
                                    "version",
                                    "description"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                "endpoints": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "index": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "remote": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "streamable-http",
                                              "sse"
                                            ]
                                          },
                                          "url": {
                                            "type": "string"
                                          },
                                          "headers": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "description": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isRequired": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isSecret": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "format": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "string",
                                                            "number",
                                                            "boolean",
                                                            "filepath"
                                                          ]
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "default": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "placeholder": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "choices": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "variables": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "additionalProperties": {
                                                            "type": "object",
                                                            "properties": {
                                                              "description": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isRequired": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "isSecret": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "format": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "string",
                                                                      "number",
                                                                      "boolean",
                                                                      "filepath"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "default": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "placeholder": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              },
                                                              "choices": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ]
                                                              }
                                                            },
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "variables": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {
                                                  "type": "object",
                                                  "properties": {
                                                    "description": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isRequired": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "isSecret": {
                                                      "anyOf": [
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "format": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "string",
                                                            "number",
                                                            "boolean",
                                                            "filepath"
                                                          ]
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "default": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "placeholder": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "choices": {
                                                      "anyOf": [
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "allOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  ]
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "supportedProtocolVersions": {
                                            "anyOf": [
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "url"
                                        ],
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        ]
                                      },
                                      "requirements": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "key": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "type": "boolean"
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "key",
                                            "isSecret"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "required": [
                                      "index",
                                      "remote",
                                      "requirements"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "sources": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "role": {
                                        "type": "string",
                                        "enum": [
                                          "input",
                                          "page",
                                          "catalog",
                                          "card",
                                          "endpoint",
                                          "manual"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "originalInput": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "role",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "cardUrl",
                                "card",
                                "endpoints",
                                "sources"
                              ],
                              "additionalProperties": false
                            },
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string"
                                  },
                                  "fieldPath": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "url",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "candidate",
                            "issues"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Multiple"
                              ]
                            },
                            "candidates": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cardUrl": {
                                    "type": "string"
                                  },
                                  "card": {
                                    "type": "object",
                                    "properties": {
                                      "$schema": {
                                        "type": "string",
                                        "enum": [
                                          "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 2,
                                        "maxLength": 200
                                      },
                                      "version": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "description": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 100
                                      },
                                      "title": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 100
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "websiteUrl": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "repository": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "source": {
                                                "type": "string"
                                              },
                                              "subfolder": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "id": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url",
                                              "source"
                                            ],
                                            "allOf": [
                                              {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "icons": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "src": {
                                                  "type": "string"
                                                },
                                                "mimeType": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "sizes": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "theme": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "light",
                                                        "dark"
                                                      ]
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "src"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "remotes": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "streamable-http",
                                                    "sse"
                                                  ]
                                                },
                                                "url": {
                                                  "type": "string"
                                                },
                                                "headers": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "variables": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "additionalProperties": {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "description": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isRequired": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "isSecret": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "format": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "string",
                                                                            "number",
                                                                            "boolean",
                                                                            "filepath"
                                                                          ]
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "default": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "placeholder": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "value": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    },
                                                                    "choices": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "array",
                                                                          "items": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "allOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "additionalProperties": {}
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "name"
                                                        ],
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "variables": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "description": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isRequired": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "isSecret": {
                                                            "anyOf": [
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "format": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "string",
                                                                  "number",
                                                                  "boolean",
                                                                  "filepath"
                                                                ]
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "default": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "placeholder": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "choices": {
                                                            "anyOf": [
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "supportedProtocolVersions": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "url"
                                              ],
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "_meta": {
                                        "anyOf": [
                                          {
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "$schema",
                                      "name",
                                      "version",
                                      "description"
                                    ],
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  },
                                  "endpoints": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "index": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "remote": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "streamable-http",
                                                "sse"
                                              ]
                                            },
                                            "url": {
                                              "type": "string"
                                            },
                                            "headers": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "name": {
                                                        "type": "string"
                                                      },
                                                      "variables": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isRequired": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "isSecret": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "boolean"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "format": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "string",
                                                                        "number",
                                                                        "boolean",
                                                                        "filepath"
                                                                      ]
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "default": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "placeholder": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "value": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string"
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                },
                                                                "choices": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    {
                                                                      "type": "null"
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              "allOf": [
                                                                {
                                                                  "type": "object",
                                                                  "additionalProperties": {}
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "name"
                                                    ],
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "supportedProtocolVersions": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        },
                                        "requirements": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "key": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "isSecret": {
                                                "type": "boolean"
                                              },
                                              "format": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "choices": {
                                                "anyOf": [
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "key",
                                              "isSecret"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "index",
                                        "remote",
                                        "requirements"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "sources": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "type": "string",
                                          "enum": [
                                            "input",
                                            "page",
                                            "catalog",
                                            "card",
                                            "endpoint",
                                            "manual"
                                          ]
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "originalInput": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "cardUrl",
                                  "card",
                                  "endpoints",
                                  "sources"
                                ],
                                "additionalProperties": false
                              },
                              "minItems": 2
                            },
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string"
                                  },
                                  "reason": {
                                    "type": "string"
                                  },
                                  "fieldPath": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "url",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "candidates",
                            "issues"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "expiresAt": {
                      "type": "number"
                    },
                    "imported": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "remoteIndex": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "name",
                        "remoteIndex"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "revision",
                    "input",
                    "discovery",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{connectionId}": {
      "get": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.getConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "cardUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "card": {
                      "type": "object",
                      "properties": {
                        "$schema": {
                          "type": "string",
                          "enum": [
                            "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 200
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "websiteUrl": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repository": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string"
                                },
                                "subfolder": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "url",
                                "source"
                              ],
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "icons": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "src": {
                                    "type": "string"
                                  },
                                  "mimeType": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "sizes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "theme": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "light",
                                          "dark"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "src"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "remotes": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "_meta": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "$schema",
                        "name",
                        "version",
                        "description"
                      ],
                      "allOf": [
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    },
                    "endpoint": {
                      "type": "string"
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role": {
                            "type": "string",
                            "enum": [
                              "input",
                              "page",
                              "catalog",
                              "card",
                              "endpoint",
                              "manual"
                            ]
                          },
                          "url": {
                            "type": "string"
                          },
                          "originalInput": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "role",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "configuration": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingConfiguration"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingAuthorization"
                              ]
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "scopes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Unverified"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Available"
                              ]
                            },
                            "checkedAt": {
                              "type": "number"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "_tag",
                            "checkedAt",
                            "revision"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AuthorizationExpired"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "ConnectionFailed"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "NeedsRevalidation"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "CleanupPending"
                              ]
                            },
                            "stage": {
                              "type": "string",
                              "enum": [
                                "Credentials",
                                "Connection"
                              ]
                            }
                          },
                          "required": [
                            "_tag",
                            "stage"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Restricted"
                              ]
                            },
                            "restriction": {
                              "type": "object",
                              "properties": {
                                "cardUrl": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "appealUrl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "cardUrl",
                                "reason",
                                "appealUrl"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "_tag",
                            "restriction"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "cardUrl",
                    "card",
                    "endpoint",
                    "remoteIndex",
                    "sources",
                    "configuration",
                    "enabled",
                    "revision",
                    "availability"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.updateConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "cardUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "card": {
                      "type": "object",
                      "properties": {
                        "$schema": {
                          "type": "string",
                          "enum": [
                            "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 200
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "websiteUrl": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "repository": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string"
                                },
                                "subfolder": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "url",
                                "source"
                              ],
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "icons": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "src": {
                                    "type": "string"
                                  },
                                  "mimeType": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "sizes": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "theme": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "light",
                                          "dark"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "src"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "remotes": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "streamable-http",
                                      "sse"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "headers": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "variables": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "object",
                                                    "properties": {
                                                      "description": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isRequired": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "isSecret": {
                                                        "anyOf": [
                                                          {
                                                            "type": "boolean"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "format": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "filepath"
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "default": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "placeholder": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "value": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "choices": {
                                                        "anyOf": [
                                                          {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "variables": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "object",
                                          "properties": {
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isRequired": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "isSecret": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "format": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "filepath"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "default": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "placeholder": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "choices": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "supportedProtocolVersions": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "allOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "_meta": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "$schema",
                        "name",
                        "version",
                        "description"
                      ],
                      "allOf": [
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    },
                    "endpoint": {
                      "type": "string"
                    },
                    "remoteIndex": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role": {
                            "type": "string",
                            "enum": [
                              "input",
                              "page",
                              "catalog",
                              "card",
                              "endpoint",
                              "manual"
                            ]
                          },
                          "url": {
                            "type": "string"
                          },
                          "originalInput": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "role",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "configuration": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingConfiguration"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "PendingAuthorization"
                              ]
                            },
                            "scopes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "_tag",
                            "scopes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Unverified"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Available"
                              ]
                            },
                            "checkedAt": {
                              "type": "number"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "_tag",
                            "checkedAt",
                            "revision"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "AuthorizationExpired"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "ConnectionFailed"
                              ]
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "_tag",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "NeedsRevalidation"
                              ]
                            }
                          },
                          "required": [
                            "_tag"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "CleanupPending"
                              ]
                            },
                            "stage": {
                              "type": "string",
                              "enum": [
                                "Credentials",
                                "Connection"
                              ]
                            }
                          },
                          "required": [
                            "_tag",
                            "stage"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "_tag": {
                              "type": "string",
                              "enum": [
                                "Restricted"
                              ]
                            },
                            "restriction": {
                              "type": "object",
                              "properties": {
                                "cardUrl": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "appealUrl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "cardUrl",
                                "reason",
                                "appealUrl"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "_tag",
                            "restriction"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "cardUrl",
                    "card",
                    "endpoint",
                    "remoteIndex",
                    "sources",
                    "configuration",
                    "enabled",
                    "revision",
                    "availability"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "revision",
                  "name",
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": [
          "Connections"
        ],
        "operationId": "connections.deleteConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "400": {
            "description": "ExperienceInputInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceInputInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "AppRestricted | PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ExperienceNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ConnectionCleanupPending | ConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionCleanupPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "AppDiscoveryFailed | ConnectionConfigurationInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AppDiscoveryFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ConnectionConfigurationInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ExperienceStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExperienceStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/auth/session": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "account.session",
        "parameters": [],
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "userId": {
                      "type": "string"
                    },
                    "profile": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "emailVerified": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "memberships": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "organizationId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "suspended"
                            ]
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "super_administrator",
                                    "administrator",
                                    "administrator_read_only",
                                    "member",
                                    "auditor"
                                  ]
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "organizationId",
                          "name",
                          "status",
                          "roles"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "platformAdmin": {
                      "type": "boolean"
                    },
                    "expiresAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "userId",
                    "profile",
                    "memberships",
                    "platformAdmin",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "MembershipRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MembershipRequiredEncoded"
                }
              }
            }
          },
          "503": {
            "description": "AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                }
              }
            }
          }
        }
      }
    },
    "/auth/sign-in": {
      "post": {
        "tags": [
          "Sign-in"
        ],
        "operationId": "signIn.signIn",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                }
              }
            }
          },
          "503": {
            "description": "SignInUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SignInUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320
                  },
                  "returnTo": {
                    "type": "string",
                    "maxLength": 4096
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/organizations": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "operationId": "organizations.listOrganizations",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "suspended"
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "status",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Lists the organizations where you are a member. A user token sees only its own organization."
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "operationId": "organizations.createOrganization",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "suspended"
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "status",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "OrganizationCreationDisabled | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationCreationDisabledEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Creates an organization. You become its Super Administrator. The platform settings say who can do this.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/platform/settings": {
      "get": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.getPlatformSettings",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "publicOrigin": {
                      "type": "string",
                      "minLength": 1
                    },
                    "identityProvider": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "issuer": {
                              "type": "string",
                              "minLength": 1
                            },
                            "clientId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "clientSecret": {
                              "type": "object",
                              "properties": {
                                "set": {
                                  "type": "boolean"
                                },
                                "hint": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "set",
                                "hint"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "issuer",
                            "clientId",
                            "clientSecret"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "organizationCreation": {
                      "type": "string",
                      "enum": [
                        "anyone",
                        "platform_admins"
                      ]
                    },
                    "policyCeiling": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "effect": {
                            "type": "string",
                            "enum": [
                              "deny"
                            ]
                          },
                          "permissionGroups": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "responses.run",
                                "sessions.read",
                                "sessions.write",
                                "requests.resolve",
                                "agents.read",
                                "agents.write",
                                "agents.delegate",
                                "connections.read",
                                "connections.write",
                                "apps.use",
                                "apps.publish",
                                "models.use",
                                "tokens.read",
                                "tokens.write",
                                "organization.read",
                                "organization.write",
                                "roles.write",
                                "model_providers.read",
                                "model_providers.write",
                                "sso.read",
                                "sso.write",
                                "platform.read",
                                "platform.write",
                                "members.read",
                                "members.write",
                                "audit_logs.read"
                              ]
                            },
                            "minItems": 1
                          },
                          "resources": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 512
                            },
                            "minItems": 1
                          }
                        },
                        "required": [
                          "effect",
                          "permissionGroups",
                          "resources"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 50
                    },
                    "appRestrictions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cardUrl": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "minLength": 1
                          },
                          "appealUrl": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "cardUrl",
                          "reason",
                          "appealUrl"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 1000
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "version",
                    "publicOrigin",
                    "identityProvider",
                    "organizationCreation",
                    "policyCeiling",
                    "appRestrictions",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SettingsInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsInvalidEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "SettingsConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | SettingsUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SettingsUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.updatePlatformSettings",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "publicOrigin": {
                      "type": "string",
                      "minLength": 1
                    },
                    "identityProvider": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "issuer": {
                              "type": "string",
                              "minLength": 1
                            },
                            "clientId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "clientSecret": {
                              "type": "object",
                              "properties": {
                                "set": {
                                  "type": "boolean"
                                },
                                "hint": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "set",
                                "hint"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "issuer",
                            "clientId",
                            "clientSecret"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "organizationCreation": {
                      "type": "string",
                      "enum": [
                        "anyone",
                        "platform_admins"
                      ]
                    },
                    "policyCeiling": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "effect": {
                            "type": "string",
                            "enum": [
                              "deny"
                            ]
                          },
                          "permissionGroups": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "responses.run",
                                "sessions.read",
                                "sessions.write",
                                "requests.resolve",
                                "agents.read",
                                "agents.write",
                                "agents.delegate",
                                "connections.read",
                                "connections.write",
                                "apps.use",
                                "apps.publish",
                                "models.use",
                                "tokens.read",
                                "tokens.write",
                                "organization.read",
                                "organization.write",
                                "roles.write",
                                "model_providers.read",
                                "model_providers.write",
                                "sso.read",
                                "sso.write",
                                "platform.read",
                                "platform.write",
                                "members.read",
                                "members.write",
                                "audit_logs.read"
                              ]
                            },
                            "minItems": 1
                          },
                          "resources": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 512
                            },
                            "minItems": 1
                          }
                        },
                        "required": [
                          "effect",
                          "permissionGroups",
                          "resources"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 50
                    },
                    "appRestrictions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cardUrl": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "minLength": 1
                          },
                          "appealUrl": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "cardUrl",
                          "reason",
                          "appealUrl"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 1000
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "version",
                    "publicOrigin",
                    "identityProvider",
                    "organizationCreation",
                    "policyCeiling",
                    "appRestrictions",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SettingsInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsInvalidEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "SettingsConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | SettingsUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SettingsUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Changes the platform settings. Send the `version` that you read as `expectedVersion`. Every instance uses the new settings right away. A new `publicOrigin` signs everyone out and changes the sign-in redirect URI.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "publicOrigin": {
                    "type": "string",
                    "minLength": 1
                  },
                  "identityProvider": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "issuer": {
                            "type": "string",
                            "minLength": 1
                          },
                          "clientId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 512
                          },
                          "clientSecret": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 4096
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "issuer",
                          "clientId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "organizationCreation": {
                    "type": "string",
                    "enum": [
                      "anyone",
                      "platform_admins"
                    ]
                  },
                  "policyCeiling": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "effect": {
                          "type": "string",
                          "enum": [
                            "deny"
                          ]
                        },
                        "permissionGroups": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "responses.run",
                              "sessions.read",
                              "sessions.write",
                              "requests.resolve",
                              "agents.read",
                              "agents.write",
                              "agents.delegate",
                              "connections.read",
                              "connections.write",
                              "apps.use",
                              "apps.publish",
                              "models.use",
                              "tokens.read",
                              "tokens.write",
                              "organization.read",
                              "organization.write",
                              "roles.write",
                              "model_providers.read",
                              "model_providers.write",
                              "sso.read",
                              "sso.write",
                              "platform.read",
                              "platform.write",
                              "members.read",
                              "members.write",
                              "audit_logs.read"
                            ]
                          },
                          "minItems": 1
                        },
                        "resources": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 512
                          },
                          "minItems": 1
                        }
                      },
                      "required": [
                        "effect",
                        "permissionGroups",
                        "resources"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 50
                  },
                  "appRestrictions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "appealUrl": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "cardUrl",
                        "reason",
                        "appealUrl"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 1000
                  }
                },
                "required": [
                  "expectedVersion"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/platform/organizations": {
      "get": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.listPlatformOrganizations",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "suspended"
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "status",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/platform/organizations/{organizationId}": {
      "patch": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.updatePlatformOrganization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "suspended"
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "status",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "OrganizationNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationNotFoundEncoded"
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Suspends an organization or makes it active again. Nobody can use a suspended organization, and its tokens stop working.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "suspended"
                    ]
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/platform/admins": {
      "get": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.listPlatformAdmins",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string"
                          },
                          "userId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "addedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "email",
                          "userId",
                          "addedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.addPlatformAdmin",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "email": {
                      "type": "string"
                    },
                    "userId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "addedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "email",
                    "userId",
                    "addedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/platform/admins/{email}": {
      "delete": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.removePlatformAdmin",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "PlatformAdminNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformAdminNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "LastPlatformAdmin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LastPlatformAdminEncoded"
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/platform/model_providers": {
      "get": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.listPlatformModelProviders",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "owner": {
                            "type": "string",
                            "enum": [
                              "platform",
                              "organization"
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "openai",
                              "anthropic",
                              "openai-compat"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "endpoint": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "apiKey": {
                            "type": "object",
                            "properties": {
                              "set": {
                                "type": "boolean"
                              },
                              "hint": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "set",
                              "hint"
                            ],
                            "additionalProperties": false
                          },
                          "models": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "reasoningEfforts": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "serviceTiers": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "contextWindow": {
                                  "type": "integer",
                                  "maximum": 9007199254740991,
                                  "exclusiveMinimum": 0
                                },
                                "maxOutputTokens": {
                                  "type": "integer",
                                  "maximum": 9007199254740991,
                                  "exclusiveMinimum": 0
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "reasoningEfforts",
                                "serviceTiers"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "availability": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "All"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "None"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Selected"
                                        ]
                                      },
                                      "organizations": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        },
                                        "maxItems": 1000
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "organizations"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "owner",
                          "kind",
                          "name",
                          "endpoint",
                          "apiKey",
                          "models",
                          "availability",
                          "version",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ModelProviderInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.createPlatformModelProvider",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "owner": {
                      "type": "string",
                      "enum": [
                        "platform",
                        "organization"
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "anthropic",
                        "openai-compat"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "apiKey": {
                      "type": "object",
                      "properties": {
                        "set": {
                          "type": "boolean"
                        },
                        "hint": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "set",
                        "hint"
                      ],
                      "additionalProperties": false
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "reasoningEfforts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "serviceTiers": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "contextWindow": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          },
                          "maxOutputTokens": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "reasoningEfforts",
                          "serviceTiers"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "All"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "None"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Selected"
                                  ]
                                },
                                "organizations": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "maxItems": 1000
                                }
                              },
                              "required": [
                                "_tag",
                                "organizations"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "owner",
                    "kind",
                    "name",
                    "endpoint",
                    "apiKey",
                    "models",
                    "availability",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ModelProviderInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Adds a model provider that the platform pays for. `availability` says which organizations can use it.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "openai-compat"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "endpoint": {
                    "type": "string",
                    "minLength": 1
                  },
                  "apiKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "models": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "reasoningEfforts": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "serviceTiers": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "contextWindow": {
                          "type": "integer",
                          "maximum": 9007199254740991,
                          "exclusiveMinimum": 0
                        },
                        "maxOutputTokens": {
                          "type": "integer",
                          "maximum": 9007199254740991,
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "reasoningEfforts",
                        "serviceTiers"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 200
                  },
                  "availability": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "_tag": {
                            "type": "string",
                            "enum": [
                              "All"
                            ]
                          }
                        },
                        "required": [
                          "_tag"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "_tag": {
                            "type": "string",
                            "enum": [
                              "None"
                            ]
                          }
                        },
                        "required": [
                          "_tag"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "_tag": {
                            "type": "string",
                            "enum": [
                              "Selected"
                            ]
                          },
                          "organizations": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "maxItems": 1000
                          }
                        },
                        "required": [
                          "_tag",
                          "organizations"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "apiKey",
                  "models",
                  "availability"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/platform/model_providers/{providerId}": {
      "get": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.getPlatformModelProvider",
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "owner": {
                      "type": "string",
                      "enum": [
                        "platform",
                        "organization"
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "anthropic",
                        "openai-compat"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "apiKey": {
                      "type": "object",
                      "properties": {
                        "set": {
                          "type": "boolean"
                        },
                        "hint": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "set",
                        "hint"
                      ],
                      "additionalProperties": false
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "reasoningEfforts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "serviceTiers": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "contextWindow": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          },
                          "maxOutputTokens": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "reasoningEfforts",
                          "serviceTiers"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "All"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "None"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Selected"
                                  ]
                                },
                                "organizations": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "maxItems": 1000
                                }
                              },
                              "required": [
                                "_tag",
                                "organizations"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "owner",
                    "kind",
                    "name",
                    "endpoint",
                    "apiKey",
                    "models",
                    "availability",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ModelProviderInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.updatePlatformModelProvider",
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "owner": {
                      "type": "string",
                      "enum": [
                        "platform",
                        "organization"
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "anthropic",
                        "openai-compat"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "apiKey": {
                      "type": "object",
                      "properties": {
                        "set": {
                          "type": "boolean"
                        },
                        "hint": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "set",
                        "hint"
                      ],
                      "additionalProperties": false
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "reasoningEfforts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "serviceTiers": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "contextWindow": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          },
                          "maxOutputTokens": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "reasoningEfforts",
                          "serviceTiers"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "All"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "None"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Selected"
                                  ]
                                },
                                "organizations": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "maxItems": 1000
                                }
                              },
                              "required": [
                                "_tag",
                                "organizations"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "owner",
                    "kind",
                    "name",
                    "endpoint",
                    "apiKey",
                    "models",
                    "availability",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ModelProviderInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "endpoint": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "apiKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "models": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "reasoningEfforts": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "serviceTiers": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "contextWindow": {
                          "type": "integer",
                          "maximum": 9007199254740991,
                          "exclusiveMinimum": 0
                        },
                        "maxOutputTokens": {
                          "type": "integer",
                          "maximum": 9007199254740991,
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "reasoningEfforts",
                        "serviceTiers"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 200
                  },
                  "availability": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "_tag": {
                            "type": "string",
                            "enum": [
                              "All"
                            ]
                          }
                        },
                        "required": [
                          "_tag"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "_tag": {
                            "type": "string",
                            "enum": [
                              "None"
                            ]
                          }
                        },
                        "required": [
                          "_tag"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "_tag": {
                            "type": "string",
                            "enum": [
                              "Selected"
                            ]
                          },
                          "organizations": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "maxItems": 1000
                          }
                        },
                        "required": [
                          "_tag",
                          "organizations"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "expectedVersion"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": [
          "Platform"
        ],
        "operationId": "platform.deletePlatformModelProvider",
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "400": {
            "description": "ModelProviderInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "PlatformUnavailable | OrganizationStorageUnavailable | ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PlatformUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/user/tokens": {
      "get": {
        "tags": [
          "User tokens"
        ],
        "operationId": "userTokens.listTokens",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "prefix": {
                            "type": "string"
                          },
                          "policies": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "effect": {
                                  "type": "string",
                                  "enum": [
                                    "allow",
                                    "deny"
                                  ]
                                },
                                "permissionGroups": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "responses.run",
                                      "sessions.read",
                                      "sessions.write",
                                      "requests.resolve",
                                      "agents.read",
                                      "agents.write",
                                      "agents.delegate",
                                      "connections.read",
                                      "connections.write",
                                      "apps.use",
                                      "apps.publish",
                                      "models.use",
                                      "tokens.read",
                                      "tokens.write",
                                      "organization.read",
                                      "organization.write",
                                      "roles.write",
                                      "model_providers.read",
                                      "model_providers.write",
                                      "sso.read",
                                      "sso.write",
                                      "platform.read",
                                      "platform.write",
                                      "members.read",
                                      "members.write",
                                      "audit_logs.read"
                                    ]
                                  },
                                  "minItems": 1
                                },
                                "resources": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "maxLength": 512
                                  },
                                  "minItems": 1
                                }
                              },
                              "required": [
                                "effect",
                                "permissionGroups",
                                "resources"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 50
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lastUsedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "prefix",
                          "policies",
                          "createdAt",
                          "expiresAt",
                          "lastUsedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "TokenStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TokenStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "User tokens"
        ],
        "operationId": "userTokens.createToken",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "prefix": {
                          "type": "string"
                        },
                        "policies": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "effect": {
                                "type": "string",
                                "enum": [
                                  "allow",
                                  "deny"
                                ]
                              },
                              "permissionGroups": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "responses.run",
                                    "sessions.read",
                                    "sessions.write",
                                    "requests.resolve",
                                    "agents.read",
                                    "agents.write",
                                    "agents.delegate",
                                    "connections.read",
                                    "connections.write",
                                    "apps.use",
                                    "apps.publish",
                                    "models.use",
                                    "tokens.read",
                                    "tokens.write",
                                    "organization.read",
                                    "organization.write",
                                    "roles.write",
                                    "model_providers.read",
                                    "model_providers.write",
                                    "sso.read",
                                    "sso.write",
                                    "platform.read",
                                    "platform.write",
                                    "members.read",
                                    "members.write",
                                    "audit_logs.read"
                                  ]
                                },
                                "minItems": 1
                              },
                              "resources": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 512
                                },
                                "minItems": 1
                              }
                            },
                            "required": [
                              "effect",
                              "permissionGroups",
                              "resources"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 50
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lastUsedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "prefix",
                        "policies",
                        "createdAt",
                        "expiresAt",
                        "lastUsedAt"
                      ],
                      "additionalProperties": false
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "token",
                    "secret"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "TokenPolicyInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TokenPolicyInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "TokenLimitReached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenLimitReachedEncoded"
                }
              }
            }
          },
          "503": {
            "description": "TokenStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TokenStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "expiresInDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  },
                  "policies": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "effect": {
                          "type": "string",
                          "enum": [
                            "allow",
                            "deny"
                          ]
                        },
                        "permissionGroups": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "responses.run",
                              "sessions.read",
                              "sessions.write",
                              "requests.resolve",
                              "agents.read",
                              "agents.write",
                              "agents.delegate",
                              "connections.read",
                              "connections.write",
                              "apps.use",
                              "apps.publish",
                              "models.use",
                              "tokens.read",
                              "tokens.write",
                              "organization.read",
                              "organization.write",
                              "roles.write",
                              "model_providers.read",
                              "model_providers.write",
                              "sso.read",
                              "sso.write",
                              "platform.read",
                              "platform.write",
                              "members.read",
                              "members.write",
                              "audit_logs.read"
                            ]
                          },
                          "minItems": 1
                        },
                        "resources": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 512
                          },
                          "minItems": 1
                        }
                      },
                      "required": [
                        "effect",
                        "permissionGroups",
                        "resources"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 50,
                    "minItems": 1
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/user/tokens/{tokenId}": {
      "delete": {
        "tags": [
          "User tokens"
        ],
        "operationId": "userTokens.revokeToken",
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "400": {
            "description": "OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "TokenNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenNotFoundEncoded"
                }
              }
            }
          },
          "503": {
            "description": "TokenStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TokenStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/tokens/verify": {
      "get": {
        "tags": [
          "User tokens"
        ],
        "operationId": "userTokens.verifyToken",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "caller": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "member",
                            "user_token"
                          ]
                        },
                        "userId": {
                          "type": "string"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "tokenId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "userId",
                        "organizationId"
                      ],
                      "additionalProperties": false
                    },
                    "token": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "prefix": {
                              "type": "string"
                            },
                            "policies": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "effect": {
                                    "type": "string",
                                    "enum": [
                                      "allow",
                                      "deny"
                                    ]
                                  },
                                  "permissionGroups": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "responses.run",
                                        "sessions.read",
                                        "sessions.write",
                                        "requests.resolve",
                                        "agents.read",
                                        "agents.write",
                                        "agents.delegate",
                                        "connections.read",
                                        "connections.write",
                                        "apps.use",
                                        "apps.publish",
                                        "models.use",
                                        "tokens.read",
                                        "tokens.write",
                                        "organization.read",
                                        "organization.write",
                                        "roles.write",
                                        "model_providers.read",
                                        "model_providers.write",
                                        "sso.read",
                                        "sso.write",
                                        "platform.read",
                                        "platform.write",
                                        "members.read",
                                        "members.write",
                                        "audit_logs.read"
                                      ]
                                    },
                                    "minItems": 1
                                  },
                                  "resources": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "maxLength": 512
                                    },
                                    "minItems": 1
                                  }
                                },
                                "required": [
                                  "effect",
                                  "permissionGroups",
                                  "resources"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 50
                            },
                            "createdAt": {
                              "type": "string"
                            },
                            "expiresAt": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastUsedAt": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "prefix",
                            "policies",
                            "createdAt",
                            "expiresAt",
                            "lastUsedAt"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "caller",
                    "token"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "TokenStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TokenStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Shows who the caller is and, for a token, its policies. Every caller can use it."
      }
    },
    "/v1/organization": {
      "get": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.getOrganization",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "suspended"
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "status",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.updateOrganization",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "suspended"
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "status",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/organization/members": {
      "get": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.listMembers",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "email": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "suspended"
                            ]
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "super_administrator",
                                    "administrator",
                                    "administrator_read_only",
                                    "member",
                                    "auditor"
                                  ]
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "minItems": 1
                          },
                          "policies": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "effect": {
                                  "type": "string",
                                  "enum": [
                                    "allow",
                                    "deny"
                                  ]
                                },
                                "permissionGroups": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "responses.run",
                                      "sessions.read",
                                      "sessions.write",
                                      "requests.resolve",
                                      "agents.read",
                                      "agents.write",
                                      "agents.delegate",
                                      "connections.read",
                                      "connections.write",
                                      "apps.use",
                                      "apps.publish",
                                      "models.use",
                                      "tokens.read",
                                      "tokens.write",
                                      "organization.read",
                                      "organization.write",
                                      "roles.write",
                                      "model_providers.read",
                                      "model_providers.write",
                                      "sso.read",
                                      "sso.write",
                                      "platform.read",
                                      "platform.write",
                                      "members.read",
                                      "members.write",
                                      "audit_logs.read"
                                    ]
                                  },
                                  "minItems": 1
                                },
                                "resources": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "maxLength": 512
                                  },
                                  "minItems": 1
                                }
                              },
                              "required": [
                                "effect",
                                "permissionGroups",
                                "resources"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 50
                          },
                          "joinedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId",
                          "email",
                          "name",
                          "status",
                          "roles",
                          "policies",
                          "joinedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/members/{userId}": {
      "get": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.getMember",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "userId": {
                      "type": "string"
                    },
                    "email": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "suspended"
                      ]
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "super_administrator",
                              "administrator",
                              "administrator_read_only",
                              "member",
                              "auditor"
                            ]
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "minItems": 1
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "effect": {
                            "type": "string",
                            "enum": [
                              "allow",
                              "deny"
                            ]
                          },
                          "permissionGroups": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "responses.run",
                                "sessions.read",
                                "sessions.write",
                                "requests.resolve",
                                "agents.read",
                                "agents.write",
                                "agents.delegate",
                                "connections.read",
                                "connections.write",
                                "apps.use",
                                "apps.publish",
                                "models.use",
                                "tokens.read",
                                "tokens.write",
                                "organization.read",
                                "organization.write",
                                "roles.write",
                                "model_providers.read",
                                "model_providers.write",
                                "sso.read",
                                "sso.write",
                                "platform.read",
                                "platform.write",
                                "members.read",
                                "members.write",
                                "audit_logs.read"
                              ]
                            },
                            "minItems": 1
                          },
                          "resources": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 512
                            },
                            "minItems": 1
                          }
                        },
                        "required": [
                          "effect",
                          "permissionGroups",
                          "resources"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 50
                    },
                    "joinedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "userId",
                    "email",
                    "name",
                    "status",
                    "roles",
                    "policies",
                    "joinedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "PolicyInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PolicyInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "MemberNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "LastSuperAdministrator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LastSuperAdministratorEncoded"
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.updateMember",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "userId": {
                      "type": "string"
                    },
                    "email": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "suspended"
                      ]
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "super_administrator",
                              "administrator",
                              "administrator_read_only",
                              "member",
                              "auditor"
                            ]
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "minItems": 1
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "effect": {
                            "type": "string",
                            "enum": [
                              "allow",
                              "deny"
                            ]
                          },
                          "permissionGroups": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "responses.run",
                                "sessions.read",
                                "sessions.write",
                                "requests.resolve",
                                "agents.read",
                                "agents.write",
                                "agents.delegate",
                                "connections.read",
                                "connections.write",
                                "apps.use",
                                "apps.publish",
                                "models.use",
                                "tokens.read",
                                "tokens.write",
                                "organization.read",
                                "organization.write",
                                "roles.write",
                                "model_providers.read",
                                "model_providers.write",
                                "sso.read",
                                "sso.write",
                                "platform.read",
                                "platform.write",
                                "members.read",
                                "members.write",
                                "audit_logs.read"
                              ]
                            },
                            "minItems": 1
                          },
                          "resources": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 512
                            },
                            "minItems": 1
                          }
                        },
                        "required": [
                          "effect",
                          "permissionGroups",
                          "resources"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 50
                    },
                    "joinedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "userId",
                    "email",
                    "name",
                    "status",
                    "roles",
                    "policies",
                    "joinedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "PolicyInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PolicyInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "MemberNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "LastSuperAdministrator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LastSuperAdministratorEncoded"
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Changes the status, roles or extra policies of a member. A suspended member cannot sign in, and their tokens stop working.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "suspended"
                    ]
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "super_administrator",
                            "administrator",
                            "administrator_read_only",
                            "member",
                            "auditor"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "minItems": 1
                  },
                  "policies": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "effect": {
                          "type": "string",
                          "enum": [
                            "allow",
                            "deny"
                          ]
                        },
                        "permissionGroups": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "responses.run",
                              "sessions.read",
                              "sessions.write",
                              "requests.resolve",
                              "agents.read",
                              "agents.write",
                              "agents.delegate",
                              "connections.read",
                              "connections.write",
                              "apps.use",
                              "apps.publish",
                              "models.use",
                              "tokens.read",
                              "tokens.write",
                              "organization.read",
                              "organization.write",
                              "roles.write",
                              "model_providers.read",
                              "model_providers.write",
                              "sso.read",
                              "sso.write",
                              "platform.read",
                              "platform.write",
                              "members.read",
                              "members.write",
                              "audit_logs.read"
                            ]
                          },
                          "minItems": 1
                        },
                        "resources": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 512
                          },
                          "minItems": 1
                        }
                      },
                      "required": [
                        "effect",
                        "permissionGroups",
                        "resources"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 50
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.removeMember",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "400": {
            "description": "PolicyInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PolicyInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "MemberNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "LastSuperAdministrator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LastSuperAdministratorEncoded"
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Removes a member and revokes their tokens. If their email domain is still allowed, they join again the next time they sign in. Suspend them to keep them out."
      }
    },
    "/v1/organization/permission_groups": {
      "get": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.listPermissionGroups",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "enum": [
                          "responses.run",
                          "sessions.read",
                          "sessions.write",
                          "requests.resolve",
                          "agents.read",
                          "agents.write",
                          "agents.delegate",
                          "connections.read",
                          "connections.write",
                          "apps.use",
                          "apps.publish",
                          "models.use",
                          "tokens.read",
                          "tokens.write",
                          "organization.read",
                          "organization.write",
                          "roles.write",
                          "model_providers.read",
                          "model_providers.write",
                          "sso.read",
                          "sso.write",
                          "platform.read",
                          "platform.write",
                          "members.read",
                          "members.write",
                          "audit_logs.read"
                        ]
                      },
                      "name": {
                        "type": "string"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "platform",
                          "organization",
                          "user",
                          "session",
                          "agent",
                          "request",
                          "connection",
                          "apps",
                          "model"
                        ]
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "scope",
                      "description"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/settings": {
      "get": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.getSettings",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "defaultModel": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "helperModel": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "memory": {
                      "type": "object",
                      "properties": {
                        "use": {
                          "type": "boolean"
                        },
                        "generate": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "use",
                        "generate"
                      ],
                      "additionalProperties": false
                    },
                    "agentMemory": {
                      "type": "boolean"
                    },
                    "requestTimeoutMs": {
                      "type": "integer",
                      "minimum": 1000,
                      "maximum": 604800000
                    },
                    "appReadRules": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cardUrl": {
                            "type": "string",
                            "minLength": 1
                          },
                          "tool": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "cardUrl",
                          "tool"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 1000
                    },
                    "defaultRoles": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "super_administrator",
                              "administrator",
                              "administrator_read_only",
                              "member",
                              "auditor"
                            ]
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "minItems": 1
                    },
                    "joinByDomain": {
                      "type": "boolean"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "version",
                    "defaultModel",
                    "helperModel",
                    "memory",
                    "agentMemory",
                    "requestTimeoutMs",
                    "appReadRules",
                    "defaultRoles",
                    "joinByDomain",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SettingsInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SettingsInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "SettingsConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | SettingsUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SettingsUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.updateSettings",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "defaultModel": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "helperModel": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "memory": {
                      "type": "object",
                      "properties": {
                        "use": {
                          "type": "boolean"
                        },
                        "generate": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "use",
                        "generate"
                      ],
                      "additionalProperties": false
                    },
                    "agentMemory": {
                      "type": "boolean"
                    },
                    "requestTimeoutMs": {
                      "type": "integer",
                      "minimum": 1000,
                      "maximum": 604800000
                    },
                    "appReadRules": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cardUrl": {
                            "type": "string",
                            "minLength": 1
                          },
                          "tool": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "cardUrl",
                          "tool"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 1000
                    },
                    "defaultRoles": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "super_administrator",
                              "administrator",
                              "administrator_read_only",
                              "member",
                              "auditor"
                            ]
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "minItems": 1
                    },
                    "joinByDomain": {
                      "type": "boolean"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "version",
                    "defaultModel",
                    "helperModel",
                    "memory",
                    "agentMemory",
                    "requestTimeoutMs",
                    "appReadRules",
                    "defaultRoles",
                    "joinByDomain",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SettingsInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SettingsInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "SettingsConflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsConflictEncoded"
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | SettingsUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SettingsUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Changes the settings. Send the `version` that you read as `expectedVersion`. If someone changed the settings since then, the change fails with SettingsConflict. Every instance uses the new settings right away.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "defaultModel": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "helperModel": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "memory": {
                    "type": "object",
                    "properties": {
                      "use": {
                        "type": "boolean"
                      },
                      "generate": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "use",
                      "generate"
                    ],
                    "additionalProperties": false
                  },
                  "agentMemory": {
                    "type": "boolean"
                  },
                  "requestTimeoutMs": {
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 604800000
                  },
                  "appReadRules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "cardUrl": {
                          "type": "string",
                          "minLength": 1
                        },
                        "tool": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "cardUrl",
                        "tool"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 1000
                  },
                  "defaultRoles": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "super_administrator",
                            "administrator",
                            "administrator_read_only",
                            "member",
                            "auditor"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "minItems": 1
                  },
                  "joinByDomain": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "expectedVersion"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/organization/roles": {
      "get": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.listRoles",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "super_administrator",
                              "administrator",
                              "administrator_read_only",
                              "member",
                              "auditor"
                            ]
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "builtin": {
                        "type": "boolean"
                      },
                      "policies": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "effect": {
                              "type": "string",
                              "enum": [
                                "allow",
                                "deny"
                              ]
                            },
                            "permissionGroups": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "responses.run",
                                  "sessions.read",
                                  "sessions.write",
                                  "requests.resolve",
                                  "agents.read",
                                  "agents.write",
                                  "agents.delegate",
                                  "connections.read",
                                  "connections.write",
                                  "apps.use",
                                  "apps.publish",
                                  "models.use",
                                  "tokens.read",
                                  "tokens.write",
                                  "organization.read",
                                  "organization.write",
                                  "roles.write",
                                  "model_providers.read",
                                  "model_providers.write",
                                  "sso.read",
                                  "sso.write",
                                  "platform.read",
                                  "platform.write",
                                  "members.read",
                                  "members.write",
                                  "audit_logs.read"
                                ]
                              },
                              "minItems": 1
                            },
                            "resources": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 512
                              },
                              "minItems": 1
                            }
                          },
                          "required": [
                            "effect",
                            "permissionGroups",
                            "resources"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "description",
                      "builtin",
                      "policies"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Lists the built-in roles and the custom roles of the organization."
      },
      "post": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.createRole",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "super_administrator",
                            "administrator",
                            "administrator_read_only",
                            "member",
                            "auditor"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "builtin": {
                      "type": "boolean"
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "effect": {
                            "type": "string",
                            "enum": [
                              "allow",
                              "deny"
                            ]
                          },
                          "permissionGroups": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "responses.run",
                                "sessions.read",
                                "sessions.write",
                                "requests.resolve",
                                "agents.read",
                                "agents.write",
                                "agents.delegate",
                                "connections.read",
                                "connections.write",
                                "apps.use",
                                "apps.publish",
                                "models.use",
                                "tokens.read",
                                "tokens.write",
                                "organization.read",
                                "organization.write",
                                "roles.write",
                                "model_providers.read",
                                "model_providers.write",
                                "sso.read",
                                "sso.write",
                                "platform.read",
                                "platform.write",
                                "members.read",
                                "members.write",
                                "audit_logs.read"
                              ]
                            },
                            "minItems": 1
                          },
                          "resources": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 512
                            },
                            "minItems": 1
                          }
                        },
                        "required": [
                          "effect",
                          "permissionGroups",
                          "resources"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "builtin",
                    "policies"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "PolicyInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PolicyInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "RoleNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "RoleInUse | RoleReadOnly",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/RoleInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RoleReadOnlyEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Creates a custom role. Its policies cannot allow anything that you cannot do yourself.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "policies": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "effect": {
                          "type": "string",
                          "enum": [
                            "allow",
                            "deny"
                          ]
                        },
                        "permissionGroups": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "responses.run",
                              "sessions.read",
                              "sessions.write",
                              "requests.resolve",
                              "agents.read",
                              "agents.write",
                              "agents.delegate",
                              "connections.read",
                              "connections.write",
                              "apps.use",
                              "apps.publish",
                              "models.use",
                              "tokens.read",
                              "tokens.write",
                              "organization.read",
                              "organization.write",
                              "roles.write",
                              "model_providers.read",
                              "model_providers.write",
                              "sso.read",
                              "sso.write",
                              "platform.read",
                              "platform.write",
                              "members.read",
                              "members.write",
                              "audit_logs.read"
                            ]
                          },
                          "minItems": 1
                        },
                        "resources": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 512
                          },
                          "minItems": 1
                        }
                      },
                      "required": [
                        "effect",
                        "permissionGroups",
                        "resources"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 50
                  }
                },
                "required": [
                  "name",
                  "description",
                  "policies"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/organization/roles/{roleId}": {
      "get": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.getRole",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "super_administrator",
                            "administrator",
                            "administrator_read_only",
                            "member",
                            "auditor"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "builtin": {
                      "type": "boolean"
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "effect": {
                            "type": "string",
                            "enum": [
                              "allow",
                              "deny"
                            ]
                          },
                          "permissionGroups": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "responses.run",
                                "sessions.read",
                                "sessions.write",
                                "requests.resolve",
                                "agents.read",
                                "agents.write",
                                "agents.delegate",
                                "connections.read",
                                "connections.write",
                                "apps.use",
                                "apps.publish",
                                "models.use",
                                "tokens.read",
                                "tokens.write",
                                "organization.read",
                                "organization.write",
                                "roles.write",
                                "model_providers.read",
                                "model_providers.write",
                                "sso.read",
                                "sso.write",
                                "platform.read",
                                "platform.write",
                                "members.read",
                                "members.write",
                                "audit_logs.read"
                              ]
                            },
                            "minItems": 1
                          },
                          "resources": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 512
                            },
                            "minItems": 1
                          }
                        },
                        "required": [
                          "effect",
                          "permissionGroups",
                          "resources"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "builtin",
                    "policies"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "PolicyInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PolicyInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "RoleNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "RoleInUse | RoleReadOnly",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/RoleInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RoleReadOnlyEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.updateRole",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "super_administrator",
                            "administrator",
                            "administrator_read_only",
                            "member",
                            "auditor"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "builtin": {
                      "type": "boolean"
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "effect": {
                            "type": "string",
                            "enum": [
                              "allow",
                              "deny"
                            ]
                          },
                          "permissionGroups": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "responses.run",
                                "sessions.read",
                                "sessions.write",
                                "requests.resolve",
                                "agents.read",
                                "agents.write",
                                "agents.delegate",
                                "connections.read",
                                "connections.write",
                                "apps.use",
                                "apps.publish",
                                "models.use",
                                "tokens.read",
                                "tokens.write",
                                "organization.read",
                                "organization.write",
                                "roles.write",
                                "model_providers.read",
                                "model_providers.write",
                                "sso.read",
                                "sso.write",
                                "platform.read",
                                "platform.write",
                                "members.read",
                                "members.write",
                                "audit_logs.read"
                              ]
                            },
                            "minItems": 1
                          },
                          "resources": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 512
                            },
                            "minItems": 1
                          }
                        },
                        "required": [
                          "effect",
                          "permissionGroups",
                          "resources"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "builtin",
                    "policies"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "PolicyInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PolicyInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "RoleNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "RoleInUse | RoleReadOnly",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/RoleInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RoleReadOnlyEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Changes a custom role. Every member with the role gets the new policies at once.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "policies": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "effect": {
                          "type": "string",
                          "enum": [
                            "allow",
                            "deny"
                          ]
                        },
                        "permissionGroups": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "responses.run",
                              "sessions.read",
                              "sessions.write",
                              "requests.resolve",
                              "agents.read",
                              "agents.write",
                              "agents.delegate",
                              "connections.read",
                              "connections.write",
                              "apps.use",
                              "apps.publish",
                              "models.use",
                              "tokens.read",
                              "tokens.write",
                              "organization.read",
                              "organization.write",
                              "roles.write",
                              "model_providers.read",
                              "model_providers.write",
                              "sso.read",
                              "sso.write",
                              "platform.read",
                              "platform.write",
                              "members.read",
                              "members.write",
                              "audit_logs.read"
                            ]
                          },
                          "minItems": 1
                        },
                        "resources": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 512
                          },
                          "minItems": 1
                        }
                      },
                      "required": [
                        "effect",
                        "permissionGroups",
                        "resources"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 50
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.deleteRole",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "400": {
            "description": "PolicyInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PolicyInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "RoleNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "RoleInUse | RoleReadOnly",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/RoleInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RoleReadOnlyEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Deletes a custom role. It fails with RoleInUse while a member or the default roles use it."
      }
    },
    "/v1/organization/audit_logs": {
      "get": {
        "tags": [
          "Organization"
        ],
        "operationId": "organization.listAuditLogs",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "member.joined",
                "member.updated",
                "member.removed",
                "organization.created",
                "organization.updated",
                "settings.updated",
                "role.created",
                "role.updated",
                "role.deleted",
                "model_provider.created",
                "model_provider.updated",
                "model_provider.deleted",
                "domain.added",
                "domain.verified",
                "domain.removed",
                "sso_connection.created",
                "sso_connection.updated",
                "sso_connection.deleted",
                "token.created",
                "token.revoked",
                "agent.created",
                "agent.updated",
                "agent.promoted",
                "agent.memory.updated",
                "delegation.started",
                "delegation.completed",
                "capability.decided",
                "request.resolved",
                "grant.created",
                "grant.revoked",
                "rule.created",
                "rule.updated"
              ]
            },
            "required": false
          },
          {
            "name": "actor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "member.joined",
                              "member.updated",
                              "member.removed",
                              "organization.created",
                              "organization.updated",
                              "settings.updated",
                              "role.created",
                              "role.updated",
                              "role.deleted",
                              "model_provider.created",
                              "model_provider.updated",
                              "model_provider.deleted",
                              "domain.added",
                              "domain.verified",
                              "domain.removed",
                              "sso_connection.created",
                              "sso_connection.updated",
                              "sso_connection.deleted",
                              "token.created",
                              "token.revoked",
                              "agent.created",
                              "agent.updated",
                              "agent.promoted",
                              "agent.memory.updated",
                              "delegation.started",
                              "delegation.completed",
                              "capability.decided",
                              "request.resolved",
                              "grant.created",
                              "grant.revoked",
                              "rule.created",
                              "rule.updated"
                            ]
                          },
                          "actor": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "member",
                                  "user_token"
                                ]
                              },
                              "userId": {
                                "type": "string"
                              },
                              "organizationId": {
                                "type": "string"
                              },
                              "tokenId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "userId",
                              "organizationId"
                            ],
                            "additionalProperties": false
                          },
                          "resource": {
                            "type": "string"
                          },
                          "details": {
                            "type": "object"
                          }
                        },
                        "required": [
                          "id",
                          "createdAt",
                          "action",
                          "actor",
                          "resource",
                          "details"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationStorageUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Lists audit log entries, newest first. `actor` filters by user ID."
      }
    },
    "/v1/organization/models": {
      "get": {
        "tags": [
          "Model providers"
        ],
        "operationId": "modelProviders.listModels",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "providers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "owner": {
                            "type": "string",
                            "enum": [
                              "platform",
                              "organization"
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "openai",
                              "anthropic",
                              "openai-compat"
                            ]
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "owner",
                          "kind",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "reasoningEfforts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "serviceTiers": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "contextWindow": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          },
                          "maxOutputTokens": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "provider",
                          "id",
                          "name",
                          "reasoningEfforts",
                          "serviceTiers"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "defaultModel": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "providers",
                    "models",
                    "defaultModel"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ModelProviderInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Lists the models that the organization can use: its own providers and the providers that the platform shares with it."
      }
    },
    "/v1/organization/model_providers": {
      "get": {
        "tags": [
          "Model providers"
        ],
        "operationId": "modelProviders.listModelProviders",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "owner": {
                            "type": "string",
                            "enum": [
                              "platform",
                              "organization"
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "openai",
                              "anthropic",
                              "openai-compat"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "endpoint": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "apiKey": {
                            "type": "object",
                            "properties": {
                              "set": {
                                "type": "boolean"
                              },
                              "hint": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "set",
                              "hint"
                            ],
                            "additionalProperties": false
                          },
                          "models": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "reasoningEfforts": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "serviceTiers": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "contextWindow": {
                                  "type": "integer",
                                  "maximum": 9007199254740991,
                                  "exclusiveMinimum": 0
                                },
                                "maxOutputTokens": {
                                  "type": "integer",
                                  "maximum": 9007199254740991,
                                  "exclusiveMinimum": 0
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "reasoningEfforts",
                                "serviceTiers"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "availability": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "All"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "None"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "_tag"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "_tag": {
                                        "type": "string",
                                        "enum": [
                                          "Selected"
                                        ]
                                      },
                                      "organizations": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        },
                                        "maxItems": 1000
                                      }
                                    },
                                    "required": [
                                      "_tag",
                                      "organizations"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "owner",
                          "kind",
                          "name",
                          "endpoint",
                          "apiKey",
                          "models",
                          "availability",
                          "version",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ModelProviderInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Model providers"
        ],
        "operationId": "modelProviders.createModelProvider",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "owner": {
                      "type": "string",
                      "enum": [
                        "platform",
                        "organization"
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "anthropic",
                        "openai-compat"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "apiKey": {
                      "type": "object",
                      "properties": {
                        "set": {
                          "type": "boolean"
                        },
                        "hint": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "set",
                        "hint"
                      ],
                      "additionalProperties": false
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "reasoningEfforts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "serviceTiers": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "contextWindow": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          },
                          "maxOutputTokens": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "reasoningEfforts",
                          "serviceTiers"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "All"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "None"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Selected"
                                  ]
                                },
                                "organizations": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "maxItems": 1000
                                }
                              },
                              "required": [
                                "_tag",
                                "organizations"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "owner",
                    "kind",
                    "name",
                    "endpoint",
                    "apiKey",
                    "models",
                    "availability",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ModelProviderInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Adds a model provider with the API key of the organization.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "openai-compat"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "endpoint": {
                    "type": "string",
                    "minLength": 1
                  },
                  "apiKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "models": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "reasoningEfforts": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "serviceTiers": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "contextWindow": {
                          "type": "integer",
                          "maximum": 9007199254740991,
                          "exclusiveMinimum": 0
                        },
                        "maxOutputTokens": {
                          "type": "integer",
                          "maximum": 9007199254740991,
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "reasoningEfforts",
                        "serviceTiers"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 200
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "apiKey",
                  "models"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/organization/model_providers/{providerId}": {
      "get": {
        "tags": [
          "Model providers"
        ],
        "operationId": "modelProviders.getModelProvider",
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "owner": {
                      "type": "string",
                      "enum": [
                        "platform",
                        "organization"
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "anthropic",
                        "openai-compat"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "apiKey": {
                      "type": "object",
                      "properties": {
                        "set": {
                          "type": "boolean"
                        },
                        "hint": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "set",
                        "hint"
                      ],
                      "additionalProperties": false
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "reasoningEfforts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "serviceTiers": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "contextWindow": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          },
                          "maxOutputTokens": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "reasoningEfforts",
                          "serviceTiers"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "All"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "None"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Selected"
                                  ]
                                },
                                "organizations": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "maxItems": 1000
                                }
                              },
                              "required": [
                                "_tag",
                                "organizations"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "owner",
                    "kind",
                    "name",
                    "endpoint",
                    "apiKey",
                    "models",
                    "availability",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ModelProviderInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Model providers"
        ],
        "operationId": "modelProviders.updateModelProvider",
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "owner": {
                      "type": "string",
                      "enum": [
                        "platform",
                        "organization"
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "anthropic",
                        "openai-compat"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "endpoint": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "apiKey": {
                      "type": "object",
                      "properties": {
                        "set": {
                          "type": "boolean"
                        },
                        "hint": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "set",
                        "hint"
                      ],
                      "additionalProperties": false
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "reasoningEfforts": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "serviceTiers": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "contextWindow": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          },
                          "maxOutputTokens": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "reasoningEfforts",
                          "serviceTiers"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "availability": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "All"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "None"
                                  ]
                                }
                              },
                              "required": [
                                "_tag"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "_tag": {
                                  "type": "string",
                                  "enum": [
                                    "Selected"
                                  ]
                                },
                                "organizations": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "maxItems": 1000
                                }
                              },
                              "required": [
                                "_tag",
                                "organizations"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "owner",
                    "kind",
                    "name",
                    "endpoint",
                    "apiKey",
                    "models",
                    "availability",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ModelProviderInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Changes a model provider. The next model call uses the change.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "endpoint": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "apiKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "models": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "reasoningEfforts": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "serviceTiers": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "contextWindow": {
                          "type": "integer",
                          "maximum": 9007199254740991,
                          "exclusiveMinimum": 0
                        },
                        "maxOutputTokens": {
                          "type": "integer",
                          "maximum": 9007199254740991,
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "reasoningEfforts",
                        "serviceTiers"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 200
                  }
                },
                "required": [
                  "expectedVersion"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": [
          "Model providers"
        ],
        "operationId": "modelProviders.deleteModelProvider",
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "400": {
            "description": "ModelProviderInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "ModelProviderNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProviderNotFoundEncoded"
                }
              }
            }
          },
          "409": {
            "description": "ModelProviderConflict | ModelProviderInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProviderConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ModelProviderInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "ModelProvidersUnavailable | AuthorizationUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ModelProvidersUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/domains": {
      "get": {
        "tags": [
          "SSO"
        ],
        "operationId": "sso.listDomains",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "domain": {
                            "type": "string"
                          },
                          "recordName": {
                            "type": "string"
                          },
                          "recordValue": {
                            "type": "string"
                          },
                          "verifiedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "domain",
                          "recordName",
                          "recordValue",
                          "verifiedAt",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SsoConnectionInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SsoConnectionInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DomainNotFound | SsoConnectionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "DomainTaken | DomainNotVerified | DomainInUse | SsoConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainTakenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainNotVerifiedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | SsoUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "SSO"
        ],
        "operationId": "sso.addDomain",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "domain": {
                      "type": "string"
                    },
                    "recordName": {
                      "type": "string"
                    },
                    "recordValue": {
                      "type": "string"
                    },
                    "verifiedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "domain",
                    "recordName",
                    "recordValue",
                    "verifiedAt",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SsoConnectionInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SsoConnectionInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DomainNotFound | SsoConnectionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "DomainTaken | DomainNotVerified | DomainInUse | SsoConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainTakenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainNotVerifiedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | SsoUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Adds an email domain. Then add the TXT record that the answer names, and call the verify endpoint.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  }
                },
                "required": [
                  "domain"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/organization/domains/{domain}/verify": {
      "post": {
        "tags": [
          "SSO"
        ],
        "operationId": "sso.verifyDomain",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "domain": {
                      "type": "string"
                    },
                    "recordName": {
                      "type": "string"
                    },
                    "recordValue": {
                      "type": "string"
                    },
                    "verifiedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "domain",
                    "recordName",
                    "recordValue",
                    "verifiedAt",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SsoConnectionInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SsoConnectionInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DomainNotFound | SsoConnectionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "DomainTaken | DomainNotVerified | DomainInUse | SsoConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainTakenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainNotVerifiedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | SsoUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Looks up the TXT record of the domain. When it is right, the domain becomes verified."
      }
    },
    "/v1/organization/domains/{domain}": {
      "delete": {
        "tags": [
          "SSO"
        ],
        "operationId": "sso.removeDomain",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "400": {
            "description": "SsoConnectionInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SsoConnectionInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DomainNotFound | SsoConnectionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "DomainTaken | DomainNotVerified | DomainInUse | SsoConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainTakenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainNotVerifiedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | SsoUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/sso_connections": {
      "get": {
        "tags": [
          "SSO"
        ],
        "operationId": "sso.listSsoConnections",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "issuer": {
                            "type": "string"
                          },
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "object",
                            "properties": {
                              "set": {
                                "type": "boolean"
                              },
                              "hint": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "set",
                              "hint"
                            ],
                            "additionalProperties": false
                          },
                          "domains": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "enforce": {
                            "type": "boolean"
                          },
                          "redirectUri": {
                            "type": "string"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "issuer",
                          "clientId",
                          "clientSecret",
                          "domains",
                          "enforce",
                          "redirectUri",
                          "version",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SsoConnectionInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SsoConnectionInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DomainNotFound | SsoConnectionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "DomainTaken | DomainNotVerified | DomainInUse | SsoConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainTakenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainNotVerifiedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | SsoUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "SSO"
        ],
        "operationId": "sso.createSsoConnection",
        "parameters": [],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "issuer": {
                      "type": "string"
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "clientSecret": {
                      "type": "object",
                      "properties": {
                        "set": {
                          "type": "boolean"
                        },
                        "hint": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "set",
                        "hint"
                      ],
                      "additionalProperties": false
                    },
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "enforce": {
                      "type": "boolean"
                    },
                    "redirectUri": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "issuer",
                    "clientId",
                    "clientSecret",
                    "domains",
                    "enforce",
                    "redirectUri",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SsoConnectionInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SsoConnectionInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DomainNotFound | SsoConnectionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "DomainTaken | DomainNotVerified | DomainInUse | SsoConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainTakenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainNotVerifiedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | SsoUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Adds an OpenID Connect provider for people with an email in verified domains of the organization.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "issuer": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "clientSecret": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 50
                  },
                  "enforce": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "issuer",
                  "clientId",
                  "domains",
                  "enforce"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/organization/sso_connections/{connectionId}": {
      "get": {
        "tags": [
          "SSO"
        ],
        "operationId": "sso.getSsoConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "issuer": {
                      "type": "string"
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "clientSecret": {
                      "type": "object",
                      "properties": {
                        "set": {
                          "type": "boolean"
                        },
                        "hint": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "set",
                        "hint"
                      ],
                      "additionalProperties": false
                    },
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "enforce": {
                      "type": "boolean"
                    },
                    "redirectUri": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "issuer",
                    "clientId",
                    "clientSecret",
                    "domains",
                    "enforce",
                    "redirectUri",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SsoConnectionInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SsoConnectionInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DomainNotFound | SsoConnectionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "DomainTaken | DomainNotVerified | DomainInUse | SsoConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainTakenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainNotVerifiedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | SsoUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "SSO"
        ],
        "operationId": "sso.updateSsoConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "issuer": {
                      "type": "string"
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "clientSecret": {
                      "type": "object",
                      "properties": {
                        "set": {
                          "type": "boolean"
                        },
                        "hint": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "set",
                        "hint"
                      ],
                      "additionalProperties": false
                    },
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "enforce": {
                      "type": "boolean"
                    },
                    "redirectUri": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "issuer",
                    "clientId",
                    "clientSecret",
                    "domains",
                    "enforce",
                    "redirectUri",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "SsoConnectionInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SsoConnectionInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DomainNotFound | SsoConnectionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "DomainTaken | DomainNotVerified | DomainInUse | SsoConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainTakenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainNotVerifiedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | SsoUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "issuer": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "clientSecret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 4096
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 50
                  },
                  "enforce": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "expectedVersion"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": [
          "SSO"
        ],
        "operationId": "sso.deleteSsoConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "<No Content>"
          },
          "400": {
            "description": "SsoConnectionInvalid | OrganizationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SsoConnectionInvalidEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationRequiredEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthenticationRequired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationRequiredEncoded"
                }
              }
            }
          },
          "403": {
            "description": "PermissionDenied | MembershipRequired | ForbiddenOrigin",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PermissionDeniedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MembershipRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ForbiddenOriginEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "DomainNotFound | SsoConnectionNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "DomainTaken | DomainNotVerified | DomainInUse | SsoConnectionConflict",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/DomainTakenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainNotVerifiedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/DomainInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoConnectionConflictEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "AuthorizationUnavailable | SsoUnavailable | AuthenticationUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizationUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SsoUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthenticationUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "tags": [
          "Service and health"
        ],
        "operationId": "health.getService",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "OpenBot API"
                      ]
                    },
                    "documentation": {
                      "type": "string",
                      "enum": [
                        "/docs"
                      ]
                    },
                    "openapi": {
                      "type": "string",
                      "enum": [
                        "/openapi.json"
                      ]
                    },
                    "auth": {
                      "type": "string",
                      "enum": [
                        "/auth"
                      ]
                    },
                    "tokens": {
                      "type": "string",
                      "enum": [
                        "/v1/user/tokens"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "documentation",
                    "openapi",
                    "auth",
                    "tokens"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Shows where to find the API reference, the Better Auth routes and the user token routes."
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Service and health"
        ],
        "operationId": "health.getHealth",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Checks that the HTTP service can respond. It does not check business dependencies."
      }
    }
  },
  "components": {
    "schemas": {
      "AuthenticationRequiredEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AuthenticationRequired"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "OrganizationRequiredEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "OrganizationRequired"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "SsoConnectionInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SsoConnectionInvalid"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "SsoConnectionConflictEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SsoConnectionConflict"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "_tag",
          "version"
        ],
        "additionalProperties": false
      },
      "DomainInUseEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "DomainInUse"
            ]
          },
          "domain": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "domain"
        ],
        "additionalProperties": false
      },
      "DomainNotVerifiedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "DomainNotVerified"
            ]
          },
          "domain": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "domain"
        ],
        "additionalProperties": false
      },
      "DomainTakenEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "DomainTaken"
            ]
          },
          "domain": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "domain"
        ],
        "additionalProperties": false
      },
      "SsoConnectionNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SsoConnectionNotFound"
            ]
          },
          "connectionId": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "connectionId"
        ],
        "additionalProperties": false
      },
      "DomainNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "DomainNotFound"
            ]
          },
          "domain": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "domain"
        ],
        "additionalProperties": false
      },
      "AuthenticationUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AuthenticationUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "SsoUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SsoUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "AuthorizationUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AuthorizationUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "ForbiddenOriginEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ForbiddenOrigin"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "MembershipRequiredEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "MembershipRequired"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "PermissionDeniedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PermissionDenied"
            ]
          },
          "permission": {
            "type": "string",
            "enum": [
              "responses.run",
              "sessions.read",
              "sessions.write",
              "requests.resolve",
              "agents.read",
              "agents.write",
              "agents.delegate",
              "connections.read",
              "connections.write",
              "apps.use",
              "apps.publish",
              "models.use",
              "tokens.read",
              "tokens.write",
              "organization.read",
              "organization.write",
              "roles.write",
              "model_providers.read",
              "model_providers.write",
              "sso.read",
              "sso.write",
              "platform.read",
              "platform.write",
              "members.read",
              "members.write",
              "audit_logs.read"
            ]
          },
          "resource": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "permission",
          "resource"
        ],
        "additionalProperties": false
      },
      "ModelProvidersUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ModelProvidersUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "ModelProviderInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ModelProviderInvalid"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "ModelProviderInUseEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ModelProviderInUse"
            ]
          },
          "providerId": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "providerId"
        ],
        "additionalProperties": false
      },
      "ModelProviderConflictEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ModelProviderConflict"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "_tag",
          "version"
        ],
        "additionalProperties": false
      },
      "ModelProviderNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ModelProviderNotFound"
            ]
          },
          "providerId": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "providerId"
        ],
        "additionalProperties": false
      },
      "Config.SelectionEncoded_1": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "Config.Selection"
            ]
          },
          "provider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "reasoningEffort": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "serviceTier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "_tag",
          "provider",
          "model"
        ],
        "additionalProperties": false
      },
      "OrganizationStorageUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "OrganizationStorageUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "PolicyInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PolicyInvalid"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "RoleReadOnlyEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "RoleReadOnly"
            ]
          },
          "roleId": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "roleId"
        ],
        "additionalProperties": false
      },
      "RoleInUseEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "RoleInUse"
            ]
          },
          "roleId": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "roleId"
        ],
        "additionalProperties": false
      },
      "RoleNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "RoleNotFound"
            ]
          },
          "roleId": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "roleId"
        ],
        "additionalProperties": false
      },
      "SettingsInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SettingsInvalid"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "SettingsConflictEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SettingsConflict"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "_tag",
          "version"
        ],
        "additionalProperties": false
      },
      "SettingsUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SettingsUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "LastSuperAdministratorEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LastSuperAdministrator"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "MemberNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "MemberNotFound"
            ]
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "userId"
        ],
        "additionalProperties": false
      },
      "TokenStorageUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "TokenStorageUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "TokenNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "TokenNotFound"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "TokenPolicyInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "TokenPolicyInvalid"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "TokenLimitReachedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "TokenLimitReached"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "_tag",
          "limit"
        ],
        "additionalProperties": false
      },
      "PlatformUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PlatformUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "LastPlatformAdminEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LastPlatformAdmin"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "PlatformAdminNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PlatformAdminNotFound"
            ]
          },
          "email": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "email"
        ],
        "additionalProperties": false
      },
      "OrganizationNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "OrganizationNotFound"
            ]
          },
          "organizationId": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "organizationId"
        ],
        "additionalProperties": false
      },
      "OrganizationCreationDisabledEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "OrganizationCreationDisabled"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "SignInUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SignInUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "ConnectionConfigurationInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ConnectionConfigurationInvalid"
            ]
          },
          "message": {
            "type": "string"
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "_tag",
          "message",
          "keys"
        ],
        "additionalProperties": false
      },
      "AppDiscoveryFailedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AppDiscoveryFailed"
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "InvalidInput",
              "IncompatibleCard",
              "NoDeclaration",
              "NoUsableServices",
              "Document",
              "Http",
              "BlockedTarget",
              "Transport",
              "TooLarge",
              "Timeout",
              "Redirect",
              "Encoding"
            ]
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "fieldPath": {
                  "type": "string"
                }
              },
              "required": [
                "url",
                "reason"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "_tag",
          "reason",
          "issues"
        ],
        "additionalProperties": false
      },
      "ExperienceStorageUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ExperienceStorageUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "ExperienceNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ExperienceNotFound"
            ]
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "id"
        ],
        "additionalProperties": false
      },
      "ExperienceInputInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ExperienceInputInvalid"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "AppRestrictedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AppRestricted"
            ]
          },
          "restriction": {
            "type": "object",
            "properties": {
              "cardUrl": {
                "type": "string"
              },
              "reason": {
                "type": "string",
                "minLength": 1
              },
              "appealUrl": {
                "type": "string"
              }
            },
            "required": [
              "cardUrl",
              "reason",
              "appealUrl"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "_tag",
          "restriction"
        ],
        "additionalProperties": false
      },
      "ConnectionConflictEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ConnectionConflict"
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "CandidateChanged",
              "RevisionChanged",
              "DraftExpired",
              "AlreadyAdded",
              "LimitReached"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "reason",
          "message"
        ],
        "additionalProperties": false
      },
      "ConnectionCleanupPendingEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ConnectionCleanupPending"
            ]
          },
          "connectionId": {
            "type": "string"
          },
          "stage": {
            "type": "string",
            "enum": [
              "Credentials",
              "Connection"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "connectionId",
          "stage",
          "message"
        ],
        "additionalProperties": false
      },
      "SessionConflictEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SessionConflict"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "AppViewUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AppViewUnavailable"
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "Declaration",
              "Resource",
              "ConnectionChanged",
              "Closed",
              "Unsupported",
              "Protocol"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "reason",
          "message"
        ],
        "additionalProperties": false
      },
      "AgentInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AgentInvalid"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "RequestConflictEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "RequestConflict"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "AgentConflictEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AgentConflict"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "RequestNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "RequestNotFound"
            ]
          },
          "request": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "request"
        ],
        "additionalProperties": false
      },
      "AgentNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AgentNotFound"
            ]
          },
          "agent": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "agent"
        ],
        "additionalProperties": false
      },
      "AgentStorageUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AgentStorageUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "SessionStorageUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SessionStorageUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "SessionModelInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SessionModelInvalid"
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "provider-not-found",
              "model-not-found",
              "unsupported-option"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "reason",
          "message"
        ],
        "additionalProperties": false
      },
      "SessionInvalidRecordEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SessionInvalidRecord"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "SessionBusyEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SessionBusy"
            ]
          },
          "session": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "session"
        ],
        "additionalProperties": false
      },
      "SessionNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SessionNotFound"
            ]
          },
          "session": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "session"
        ],
        "additionalProperties": false
      },
      "PromptEncoded": {},
      "effect_ai_AiResponse_UsageEncoded": {
        "type": "object",
        "properties": {
          "inputTokens": {
            "type": "object",
            "properties": {
              "uncached": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "total": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cacheRead": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cacheWrite": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          "outputTokens": {
            "type": "object",
            "properties": {
              "total": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "text": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reasoning": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "inputTokens",
          "outputTokens"
        ],
        "additionalProperties": false
      },
      "SessionExecutionUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SessionExecutionUnavailable"
            ]
          },
          "session": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "session"
        ],
        "additionalProperties": false
      },
      "Config.ModelEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "Config.Model"
            ]
          },
          "provider": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "list",
                  "hide",
                  "none"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "defaultReasoningLevel": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "reasoningLevels": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "effort": {
                      "type": "string",
                      "minLength": 1
                    },
                    "description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "effort",
                    "description"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "defaultServiceTier": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "serviceTierOptions": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "maxContextWindow": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "effectiveContextWindowPercent": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "effectiveContextWindow": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "instructionsTemplate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "supportVerbosity": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "defaultVerbosity": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "supportsReasoningSummaryParameter": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "defaultReasoningSummary": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "auto",
                  "concise",
                  "detailed",
                  "none"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "reasoningEfforts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "serviceTiers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxInputTokens": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "maxOutputTokensLimit": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "maxOutputTokens": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "topP": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokenCounting": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "native",
                  "estimate"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "contextWindow": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "compaction": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "_tag": {
                        "type": "string",
                        "enum": [
                          "Native"
                        ]
                      }
                    },
                    "required": [
                      "_tag"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "_tag": {
                        "type": "string",
                        "enum": [
                          "NonNative"
                        ]
                      },
                      "model": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/Config.SelectionEncoded_1"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "keepRecentMessages": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "_tag"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "autoCompactTokenLimit": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "_tag",
          "provider",
          "id",
          "name",
          "reasoningEfforts",
          "serviceTiers"
        ],
        "additionalProperties": false
      },
      "AppAuthorizationFailedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AppAuthorizationFailed"
            ]
          },
          "reason": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "reason",
          "message"
        ],
        "additionalProperties": false
      },
      "AppAuthorizationUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AppAuthorizationUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "IndexUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "IndexUnavailable"
            ]
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "minLength": 1
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "source",
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "_tag",
          "issues"
        ],
        "additionalProperties": false
      },
      "IndexNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "IndexNotFound"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "IndexInputInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "IndexInputInvalid"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "IndexRestrictedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "IndexRestricted"
            ]
          },
          "restriction": {
            "type": "object",
            "properties": {
              "cardUrl": {
                "type": "string"
              },
              "reason": {
                "type": "string",
                "minLength": 1
              },
              "appealUrl": {
                "type": "string"
              }
            },
            "required": [
              "cardUrl",
              "reason",
              "appealUrl"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "_tag",
          "restriction"
        ],
        "additionalProperties": false
      },
      "DeveloperUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "DeveloperUnavailable"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "DeveloperConflictEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "DeveloperConflict"
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "reason"
        ],
        "additionalProperties": false
      },
      "DeveloperNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "DeveloperNotFound"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "DeveloperInputInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "DeveloperInputInvalid"
            ]
          },
          "message": {
            "type": "string"
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "_tag",
          "message"
        ],
        "additionalProperties": false
      },
      "DeveloperForbiddenEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "DeveloperForbidden"
            ]
          }
        },
        "required": [
          "_tag"
        ],
        "additionalProperties": false
      },
      "DeveloperRestrictedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "DeveloperRestricted"
            ]
          },
          "restriction": {
            "type": "object",
            "properties": {
              "cardUrl": {
                "type": "string"
              },
              "reason": {
                "type": "string",
                "minLength": 1
              },
              "appealUrl": {
                "type": "string"
              }
            },
            "required": [
              "cardUrl",
              "reason",
              "appealUrl"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "_tag",
          "restriction"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "token": {
        "type": "http",
        "scheme": "Bearer"
      },
      "session": {
        "type": "apiKey",
        "name": "__Host-openbot-session",
        "in": "cookie"
      }
    }
  },
  "security": [],
  "tags": [
    {
      "name": "Account",
      "description": "Read the signed-in user and their organizations."
    },
    {
      "name": "Sign-in",
      "description": "Start a browser sign-in."
    },
    {
      "name": "Organizations",
      "description": "List your organizations and make a new one."
    },
    {
      "name": "User tokens",
      "description": "Make, list, check, and revoke user tokens."
    },
    {
      "name": "Organization",
      "description": "Manage settings, members, roles, policies, and the audit log."
    },
    {
      "name": "Model providers",
      "description": "Add model providers with your own keys, and list the models you can use."
    },
    {
      "name": "SSO",
      "description": "Verify email domains and add SSO connections."
    },
    {
      "name": "Platform",
      "description": "Manage the whole platform. Only platform admins can use it."
    },
    {
      "name": "Agents",
      "description": "Make and manage Agents, their memory, Rules, and Grants."
    },
    {
      "name": "Sessions",
      "description": "Give work to an Agent in Sessions and Turns."
    },
    {
      "name": "Requests",
      "description": "Answer the requests of your Agents for new capabilities."
    },
    {
      "name": "App discovery",
      "description": "Find Apps that the Agent can use."
    },
    {
      "name": "Connections",
      "description": "Connect an account to an App."
    },
    {
      "name": "App authorization",
      "description": "Let an App act for you."
    },
    {
      "name": "App authorization callbacks",
      "description": "Pages that an App sends you back to after authorization."
    },
    {
      "name": "App operations",
      "description": "Run App operations and read their results."
    },
    {
      "name": "App views",
      "description": "Read the views that Apps show."
    },
    {
      "name": "App transfer and reset",
      "description": "Export, import, and reset what the Agent learned about Apps."
    },
    {
      "name": "App Index",
      "description": "Search the public index of Apps."
    },
    {
      "name": "Developer tools",
      "description": "Test and watch the Apps that you publish."
    },
    {
      "name": "Public developer tools",
      "description": "Developer tools that work without sign-in."
    },
    {
      "name": "Service and health",
      "description": "Read the service document and check health."
    }
  ]
}
