{
  "components": {
    "schemas": {
      "AssistantTurnOutcome": {
        "anyOf": [
          {
            "additionalProperties": false,
            "properties": {
              "citations": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "citation_id": {
                      "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                      "type": "string"
                    },
                    "excerpt": {
                      "maxLength": 1024,
                      "minLength": 1,
                      "type": "string"
                    },
                    "title": {
                      "maxLength": 256,
                      "minLength": 1,
                      "type": "string"
                    },
                    "url": {
                      "format": "uri",
                      "maxLength": 2048,
                      "minLength": 9,
                      "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                      "type": "string"
                    }
                  },
                  "required": ["citation_id", "title", "excerpt", "url"],
                  "type": "object"
                },
                "maxItems": 20,
                "minItems": 1,
                "type": "array"
              },
              "outcome": {
                "const": "answered",
                "type": "string"
              },
              "reason_code": {
                "type": "null"
              }
            },
            "required": ["outcome", "reason_code", "citations"],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "citations": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "citation_id": {
                      "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                      "type": "string"
                    },
                    "excerpt": {
                      "maxLength": 1024,
                      "minLength": 1,
                      "type": "string"
                    },
                    "title": {
                      "maxLength": 256,
                      "minLength": 1,
                      "type": "string"
                    },
                    "url": {
                      "format": "uri",
                      "maxLength": 2048,
                      "minLength": 9,
                      "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                      "type": "string"
                    }
                  },
                  "required": ["citation_id", "title", "excerpt", "url"],
                  "type": "object"
                },
                "maxItems": 20,
                "type": "array"
              },
              "outcome": {
                "const": "refused",
                "type": "string"
              },
              "reason_code": {
                "anyOf": [
                  {
                    "const": "knowledge_insufficient",
                    "type": "string"
                  },
                  {
                    "const": "source_conflict",
                    "type": "string"
                  },
                  {
                    "const": "policy_restricted",
                    "type": "string"
                  },
                  {
                    "const": "high_risk_business",
                    "type": "string"
                  },
                  {
                    "const": "acl_denied",
                    "type": "string"
                  },
                  {
                    "const": "provider_unavailable",
                    "type": "string"
                  },
                  {
                    "const": "provider_unknown",
                    "type": "string"
                  },
                  {
                    "const": "citation_invalid",
                    "type": "string"
                  },
                  {
                    "const": "output_blocked",
                    "type": "string"
                  },
                  {
                    "const": "user_requested_human",
                    "type": "string"
                  },
                  {
                    "const": "business_rule_handoff",
                    "type": "string"
                  }
                ]
              }
            },
            "required": ["outcome", "reason_code", "citations"],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "citations": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "citation_id": {
                      "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                      "type": "string"
                    },
                    "excerpt": {
                      "maxLength": 1024,
                      "minLength": 1,
                      "type": "string"
                    },
                    "title": {
                      "maxLength": 256,
                      "minLength": 1,
                      "type": "string"
                    },
                    "url": {
                      "format": "uri",
                      "maxLength": 2048,
                      "minLength": 9,
                      "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                      "type": "string"
                    }
                  },
                  "required": ["citation_id", "title", "excerpt", "url"],
                  "type": "object"
                },
                "maxItems": 20,
                "type": "array"
              },
              "handoff": {
                "additionalProperties": false,
                "properties": {
                  "state": {
                    "const": "handoff_requested",
                    "type": "string"
                  },
                  "ticket_id": {
                    "pattern": "^ht_[0-9A-HJKMNP-TV-Z]{26}$",
                    "type": "string"
                  }
                },
                "required": ["ticket_id", "state"],
                "type": "object"
              },
              "outcome": {
                "const": "handoff_required",
                "type": "string"
              },
              "reason_code": {
                "anyOf": [
                  {
                    "const": "knowledge_insufficient",
                    "type": "string"
                  },
                  {
                    "const": "source_conflict",
                    "type": "string"
                  },
                  {
                    "const": "policy_restricted",
                    "type": "string"
                  },
                  {
                    "const": "high_risk_business",
                    "type": "string"
                  },
                  {
                    "const": "acl_denied",
                    "type": "string"
                  },
                  {
                    "const": "provider_unavailable",
                    "type": "string"
                  },
                  {
                    "const": "provider_unknown",
                    "type": "string"
                  },
                  {
                    "const": "citation_invalid",
                    "type": "string"
                  },
                  {
                    "const": "output_blocked",
                    "type": "string"
                  },
                  {
                    "const": "user_requested_human",
                    "type": "string"
                  },
                  {
                    "const": "business_rule_handoff",
                    "type": "string"
                  }
                ]
              }
            },
            "required": ["outcome", "reason_code", "citations", "handoff"],
            "type": "object"
          }
        ]
      },
      "ClientEventEnvelope": {
        "anyOf": [
          {
            "additionalProperties": false,
            "properties": {
              "conversation_id": {
                "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "event_id": {
                "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "occurred_at": {
                "format": "date-time",
                "type": "string"
              },
              "payload": {
                "additionalProperties": false,
                "properties": {
                  "owner_epoch": {
                    "const": 1,
                    "type": "number"
                  },
                  "state": {
                    "const": "bot_active",
                    "type": "string"
                  },
                  "state_version": {
                    "const": 1,
                    "type": "number"
                  }
                },
                "required": ["state", "state_version", "owner_epoch"],
                "type": "object"
              },
              "protocol_version": {
                "const": "1.0",
                "type": "string"
              },
              "sequence": {
                "maximum": 9007199254740991,
                "minimum": 1,
                "type": "integer"
              },
              "trace_id": {
                "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "type": {
                "const": "conversation.snapshot",
                "type": "string"
              }
            },
            "required": [
              "protocol_version",
              "event_id",
              "sequence",
              "conversation_id",
              "occurred_at",
              "trace_id",
              "type",
              "payload"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "conversation_id": {
                "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "event_id": {
                "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "occurred_at": {
                "format": "date-time",
                "type": "string"
              },
              "payload": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "author": {
                        "const": "visitor",
                        "type": "string"
                      },
                      "message_id": {
                        "pattern": "^msg_[0-9A-HJKMNP-TV-Z]{26}$",
                        "type": "string"
                      },
                      "parts": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "text": {
                              "maxLength": 8000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": {
                              "const": "text",
                              "type": "string"
                            }
                          },
                          "required": ["type", "text"],
                          "type": "object"
                        },
                        "maxItems": 20,
                        "minItems": 1,
                        "type": "array"
                      }
                    },
                    "required": ["author", "message_id", "parts"],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "assistant_result": {
                        "anyOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "citations": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "citation_id": {
                                      "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                                      "type": "string"
                                    },
                                    "excerpt": {
                                      "maxLength": 1024,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "title": {
                                      "maxLength": 256,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "url": {
                                      "format": "uri",
                                      "maxLength": 2048,
                                      "minLength": 9,
                                      "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                                      "type": "string"
                                    }
                                  },
                                  "required": ["citation_id", "title", "excerpt", "url"],
                                  "type": "object"
                                },
                                "maxItems": 20,
                                "minItems": 1,
                                "type": "array"
                              },
                              "outcome": {
                                "const": "answered",
                                "type": "string"
                              },
                              "reason_code": {
                                "type": "null"
                              }
                            },
                            "required": ["outcome", "reason_code", "citations"],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "citations": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "citation_id": {
                                      "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                                      "type": "string"
                                    },
                                    "excerpt": {
                                      "maxLength": 1024,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "title": {
                                      "maxLength": 256,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "url": {
                                      "format": "uri",
                                      "maxLength": 2048,
                                      "minLength": 9,
                                      "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                                      "type": "string"
                                    }
                                  },
                                  "required": ["citation_id", "title", "excerpt", "url"],
                                  "type": "object"
                                },
                                "maxItems": 20,
                                "type": "array"
                              },
                              "outcome": {
                                "const": "refused",
                                "type": "string"
                              },
                              "reason_code": {
                                "anyOf": [
                                  {
                                    "const": "knowledge_insufficient",
                                    "type": "string"
                                  },
                                  {
                                    "const": "source_conflict",
                                    "type": "string"
                                  },
                                  {
                                    "const": "policy_restricted",
                                    "type": "string"
                                  },
                                  {
                                    "const": "high_risk_business",
                                    "type": "string"
                                  },
                                  {
                                    "const": "acl_denied",
                                    "type": "string"
                                  },
                                  {
                                    "const": "provider_unavailable",
                                    "type": "string"
                                  },
                                  {
                                    "const": "provider_unknown",
                                    "type": "string"
                                  },
                                  {
                                    "const": "citation_invalid",
                                    "type": "string"
                                  },
                                  {
                                    "const": "output_blocked",
                                    "type": "string"
                                  },
                                  {
                                    "const": "user_requested_human",
                                    "type": "string"
                                  },
                                  {
                                    "const": "business_rule_handoff",
                                    "type": "string"
                                  }
                                ]
                              }
                            },
                            "required": ["outcome", "reason_code", "citations"],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "citations": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "citation_id": {
                                      "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                                      "type": "string"
                                    },
                                    "excerpt": {
                                      "maxLength": 1024,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "title": {
                                      "maxLength": 256,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "url": {
                                      "format": "uri",
                                      "maxLength": 2048,
                                      "minLength": 9,
                                      "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                                      "type": "string"
                                    }
                                  },
                                  "required": ["citation_id", "title", "excerpt", "url"],
                                  "type": "object"
                                },
                                "maxItems": 20,
                                "type": "array"
                              },
                              "handoff": {
                                "additionalProperties": false,
                                "properties": {
                                  "state": {
                                    "const": "handoff_requested",
                                    "type": "string"
                                  },
                                  "ticket_id": {
                                    "pattern": "^ht_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  }
                                },
                                "required": ["ticket_id", "state"],
                                "type": "object"
                              },
                              "outcome": {
                                "const": "handoff_required",
                                "type": "string"
                              },
                              "reason_code": {
                                "anyOf": [
                                  {
                                    "const": "knowledge_insufficient",
                                    "type": "string"
                                  },
                                  {
                                    "const": "source_conflict",
                                    "type": "string"
                                  },
                                  {
                                    "const": "policy_restricted",
                                    "type": "string"
                                  },
                                  {
                                    "const": "high_risk_business",
                                    "type": "string"
                                  },
                                  {
                                    "const": "acl_denied",
                                    "type": "string"
                                  },
                                  {
                                    "const": "provider_unavailable",
                                    "type": "string"
                                  },
                                  {
                                    "const": "provider_unknown",
                                    "type": "string"
                                  },
                                  {
                                    "const": "citation_invalid",
                                    "type": "string"
                                  },
                                  {
                                    "const": "output_blocked",
                                    "type": "string"
                                  },
                                  {
                                    "const": "user_requested_human",
                                    "type": "string"
                                  },
                                  {
                                    "const": "business_rule_handoff",
                                    "type": "string"
                                  }
                                ]
                              }
                            },
                            "required": ["outcome", "reason_code", "citations", "handoff"],
                            "type": "object"
                          }
                        ]
                      },
                      "author": {
                        "const": "assistant",
                        "type": "string"
                      },
                      "message_id": {
                        "pattern": "^msg_[0-9A-HJKMNP-TV-Z]{26}$",
                        "type": "string"
                      },
                      "parts": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "text": {
                              "maxLength": 8000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": {
                              "const": "text",
                              "type": "string"
                            }
                          },
                          "required": ["type", "text"],
                          "type": "object"
                        },
                        "maxItems": 20,
                        "minItems": 1,
                        "type": "array"
                      },
                      "run_id": {
                        "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$",
                        "type": "string"
                      }
                    },
                    "required": ["author", "message_id", "run_id", "parts", "assistant_result"],
                    "type": "object"
                  }
                ]
              },
              "protocol_version": {
                "const": "1.0",
                "type": "string"
              },
              "sequence": {
                "maximum": 9007199254740991,
                "minimum": 1,
                "type": "integer"
              },
              "trace_id": {
                "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "type": {
                "const": "message.completed",
                "type": "string"
              }
            },
            "required": [
              "protocol_version",
              "event_id",
              "sequence",
              "conversation_id",
              "occurred_at",
              "trace_id",
              "type",
              "payload"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "conversation_id": {
                "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "event_id": {
                "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "occurred_at": {
                "format": "date-time",
                "type": "string"
              },
              "payload": {
                "additionalProperties": false,
                "properties": {
                  "actor": {
                    "anyOf": [
                      {
                        "const": "visitor",
                        "type": "string"
                      },
                      {
                        "const": "assistant",
                        "type": "string"
                      },
                      {
                        "const": "system",
                        "type": "string"
                      }
                    ]
                  },
                  "from_state": {
                    "anyOf": [
                      {
                        "const": "bot_active",
                        "type": "string"
                      },
                      {
                        "const": "handoff_requested",
                        "type": "string"
                      },
                      {
                        "const": "queued",
                        "type": "string"
                      },
                      {
                        "const": "human_active",
                        "type": "string"
                      },
                      {
                        "const": "wrap_up",
                        "type": "string"
                      },
                      {
                        "const": "closed",
                        "type": "string"
                      }
                    ]
                  },
                  "owner_epoch": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "reason_code": {
                    "anyOf": [
                      {
                        "const": "knowledge_insufficient",
                        "type": "string"
                      },
                      {
                        "const": "source_conflict",
                        "type": "string"
                      },
                      {
                        "const": "policy_restricted",
                        "type": "string"
                      },
                      {
                        "const": "high_risk_business",
                        "type": "string"
                      },
                      {
                        "const": "acl_denied",
                        "type": "string"
                      },
                      {
                        "const": "provider_unavailable",
                        "type": "string"
                      },
                      {
                        "const": "provider_unknown",
                        "type": "string"
                      },
                      {
                        "const": "citation_invalid",
                        "type": "string"
                      },
                      {
                        "const": "output_blocked",
                        "type": "string"
                      },
                      {
                        "const": "user_requested_human",
                        "type": "string"
                      },
                      {
                        "const": "business_rule_handoff",
                        "type": "string"
                      }
                    ]
                  },
                  "state_version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "to_state": {
                    "anyOf": [
                      {
                        "const": "bot_active",
                        "type": "string"
                      },
                      {
                        "const": "handoff_requested",
                        "type": "string"
                      },
                      {
                        "const": "queued",
                        "type": "string"
                      },
                      {
                        "const": "human_active",
                        "type": "string"
                      },
                      {
                        "const": "wrap_up",
                        "type": "string"
                      },
                      {
                        "const": "closed",
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "from_state",
                  "to_state",
                  "state_version",
                  "owner_epoch",
                  "reason_code",
                  "actor"
                ],
                "type": "object"
              },
              "protocol_version": {
                "const": "1.0",
                "type": "string"
              },
              "sequence": {
                "maximum": 9007199254740991,
                "minimum": 1,
                "type": "integer"
              },
              "trace_id": {
                "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "type": {
                "const": "conversation.state_changed",
                "type": "string"
              }
            },
            "required": [
              "protocol_version",
              "event_id",
              "sequence",
              "conversation_id",
              "occurred_at",
              "trace_id",
              "type",
              "payload"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "conversation_id": {
                "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "event_id": {
                "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "occurred_at": {
                "format": "date-time",
                "type": "string"
              },
              "payload": {
                "additionalProperties": false,
                "properties": {
                  "owner_epoch": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "reason_code": {
                    "anyOf": [
                      {
                        "const": "knowledge_insufficient",
                        "type": "string"
                      },
                      {
                        "const": "source_conflict",
                        "type": "string"
                      },
                      {
                        "const": "policy_restricted",
                        "type": "string"
                      },
                      {
                        "const": "high_risk_business",
                        "type": "string"
                      },
                      {
                        "const": "acl_denied",
                        "type": "string"
                      },
                      {
                        "const": "provider_unavailable",
                        "type": "string"
                      },
                      {
                        "const": "provider_unknown",
                        "type": "string"
                      },
                      {
                        "const": "citation_invalid",
                        "type": "string"
                      },
                      {
                        "const": "output_blocked",
                        "type": "string"
                      },
                      {
                        "const": "user_requested_human",
                        "type": "string"
                      },
                      {
                        "const": "business_rule_handoff",
                        "type": "string"
                      }
                    ]
                  },
                  "state_version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "ticket_id": {
                    "pattern": "^ht_[0-9A-HJKMNP-TV-Z]{26}$",
                    "type": "string"
                  }
                },
                "required": ["ticket_id", "reason_code", "state_version", "owner_epoch"],
                "type": "object"
              },
              "protocol_version": {
                "const": "1.0",
                "type": "string"
              },
              "sequence": {
                "maximum": 9007199254740991,
                "minimum": 1,
                "type": "integer"
              },
              "trace_id": {
                "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              },
              "type": {
                "const": "handoff.requested",
                "type": "string"
              }
            },
            "required": [
              "protocol_version",
              "event_id",
              "sequence",
              "conversation_id",
              "occurred_at",
              "trace_id",
              "type",
              "payload"
            ],
            "type": "object"
          }
        ]
      },
      "ConversationSnapshotEvent": {
        "additionalProperties": false,
        "properties": {
          "conversation_id": {
            "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "event_id": {
            "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "payload": {
            "additionalProperties": false,
            "properties": {
              "owner_epoch": {
                "const": 1,
                "type": "number"
              },
              "state": {
                "const": "bot_active",
                "type": "string"
              },
              "state_version": {
                "const": 1,
                "type": "number"
              }
            },
            "required": ["state", "state_version", "owner_epoch"],
            "type": "object"
          },
          "protocol_version": {
            "const": "1.0",
            "type": "string"
          },
          "sequence": {
            "maximum": 9007199254740991,
            "minimum": 1,
            "type": "integer"
          },
          "trace_id": {
            "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "type": {
            "const": "conversation.snapshot",
            "type": "string"
          }
        },
        "required": [
          "protocol_version",
          "event_id",
          "sequence",
          "conversation_id",
          "occurred_at",
          "trace_id",
          "type",
          "payload"
        ],
        "type": "object"
      },
      "ErrorEnvelope": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "anyOf": [
                  {
                    "const": "invalid_request",
                    "type": "string"
                  },
                  {
                    "const": "invalid_token",
                    "type": "string"
                  },
                  {
                    "const": "origin_not_allowed",
                    "type": "string"
                  },
                  {
                    "const": "payload_too_large",
                    "type": "string"
                  },
                  {
                    "const": "rate_limit_exceeded",
                    "type": "string"
                  },
                  {
                    "const": "conversation_not_found",
                    "type": "string"
                  },
                  {
                    "const": "idempotency_conflict",
                    "type": "string"
                  },
                  {
                    "const": "conversation_state_conflict",
                    "type": "string"
                  },
                  {
                    "const": "validation_error",
                    "type": "string"
                  },
                  {
                    "const": "temporarily_unavailable",
                    "type": "string"
                  }
                ]
              },
              "message": {
                "maxLength": 512,
                "minLength": 1,
                "type": "string"
              },
              "trace_id": {
                "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              }
            },
            "required": ["code", "message", "trace_id"],
            "type": "object"
          }
        },
        "required": ["error"],
        "type": "object"
      },
      "HandoffRequestedEvent": {
        "additionalProperties": false,
        "properties": {
          "conversation_id": {
            "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "event_id": {
            "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "payload": {
            "additionalProperties": false,
            "properties": {
              "owner_epoch": {
                "maximum": 9007199254740991,
                "minimum": 1,
                "type": "integer"
              },
              "reason_code": {
                "anyOf": [
                  {
                    "const": "knowledge_insufficient",
                    "type": "string"
                  },
                  {
                    "const": "source_conflict",
                    "type": "string"
                  },
                  {
                    "const": "policy_restricted",
                    "type": "string"
                  },
                  {
                    "const": "high_risk_business",
                    "type": "string"
                  },
                  {
                    "const": "acl_denied",
                    "type": "string"
                  },
                  {
                    "const": "provider_unavailable",
                    "type": "string"
                  },
                  {
                    "const": "provider_unknown",
                    "type": "string"
                  },
                  {
                    "const": "citation_invalid",
                    "type": "string"
                  },
                  {
                    "const": "output_blocked",
                    "type": "string"
                  },
                  {
                    "const": "user_requested_human",
                    "type": "string"
                  },
                  {
                    "const": "business_rule_handoff",
                    "type": "string"
                  }
                ]
              },
              "state_version": {
                "maximum": 9007199254740991,
                "minimum": 1,
                "type": "integer"
              },
              "ticket_id": {
                "pattern": "^ht_[0-9A-HJKMNP-TV-Z]{26}$",
                "type": "string"
              }
            },
            "required": ["ticket_id", "reason_code", "state_version", "owner_epoch"],
            "type": "object"
          },
          "protocol_version": {
            "const": "1.0",
            "type": "string"
          },
          "sequence": {
            "maximum": 9007199254740991,
            "minimum": 1,
            "type": "integer"
          },
          "trace_id": {
            "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "type": {
            "const": "handoff.requested",
            "type": "string"
          }
        },
        "required": [
          "protocol_version",
          "event_id",
          "sequence",
          "conversation_id",
          "occurred_at",
          "trace_id",
          "type",
          "payload"
        ],
        "type": "object"
      },
      "MessageCompletedEvent": {
        "additionalProperties": false,
        "properties": {
          "conversation_id": {
            "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "event_id": {
            "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "payload": {
            "anyOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "author": {
                    "const": "visitor",
                    "type": "string"
                  },
                  "message_id": {
                    "pattern": "^msg_[0-9A-HJKMNP-TV-Z]{26}$",
                    "type": "string"
                  },
                  "parts": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "text": {
                          "maxLength": 8000,
                          "minLength": 1,
                          "type": "string"
                        },
                        "type": {
                          "const": "text",
                          "type": "string"
                        }
                      },
                      "required": ["type", "text"],
                      "type": "object"
                    },
                    "maxItems": 20,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": ["author", "message_id", "parts"],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "assistant_result": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "citations": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "citation_id": {
                                  "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                                  "type": "string"
                                },
                                "excerpt": {
                                  "maxLength": 1024,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "title": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "url": {
                                  "format": "uri",
                                  "maxLength": 2048,
                                  "minLength": 9,
                                  "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                                  "type": "string"
                                }
                              },
                              "required": ["citation_id", "title", "excerpt", "url"],
                              "type": "object"
                            },
                            "maxItems": 20,
                            "minItems": 1,
                            "type": "array"
                          },
                          "outcome": {
                            "const": "answered",
                            "type": "string"
                          },
                          "reason_code": {
                            "type": "null"
                          }
                        },
                        "required": ["outcome", "reason_code", "citations"],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "citations": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "citation_id": {
                                  "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                                  "type": "string"
                                },
                                "excerpt": {
                                  "maxLength": 1024,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "title": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "url": {
                                  "format": "uri",
                                  "maxLength": 2048,
                                  "minLength": 9,
                                  "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                                  "type": "string"
                                }
                              },
                              "required": ["citation_id", "title", "excerpt", "url"],
                              "type": "object"
                            },
                            "maxItems": 20,
                            "type": "array"
                          },
                          "outcome": {
                            "const": "refused",
                            "type": "string"
                          },
                          "reason_code": {
                            "anyOf": [
                              {
                                "const": "knowledge_insufficient",
                                "type": "string"
                              },
                              {
                                "const": "source_conflict",
                                "type": "string"
                              },
                              {
                                "const": "policy_restricted",
                                "type": "string"
                              },
                              {
                                "const": "high_risk_business",
                                "type": "string"
                              },
                              {
                                "const": "acl_denied",
                                "type": "string"
                              },
                              {
                                "const": "provider_unavailable",
                                "type": "string"
                              },
                              {
                                "const": "provider_unknown",
                                "type": "string"
                              },
                              {
                                "const": "citation_invalid",
                                "type": "string"
                              },
                              {
                                "const": "output_blocked",
                                "type": "string"
                              },
                              {
                                "const": "user_requested_human",
                                "type": "string"
                              },
                              {
                                "const": "business_rule_handoff",
                                "type": "string"
                              }
                            ]
                          }
                        },
                        "required": ["outcome", "reason_code", "citations"],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "citations": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "citation_id": {
                                  "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                                  "type": "string"
                                },
                                "excerpt": {
                                  "maxLength": 1024,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "title": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "url": {
                                  "format": "uri",
                                  "maxLength": 2048,
                                  "minLength": 9,
                                  "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                                  "type": "string"
                                }
                              },
                              "required": ["citation_id", "title", "excerpt", "url"],
                              "type": "object"
                            },
                            "maxItems": 20,
                            "type": "array"
                          },
                          "handoff": {
                            "additionalProperties": false,
                            "properties": {
                              "state": {
                                "const": "handoff_requested",
                                "type": "string"
                              },
                              "ticket_id": {
                                "pattern": "^ht_[0-9A-HJKMNP-TV-Z]{26}$",
                                "type": "string"
                              }
                            },
                            "required": ["ticket_id", "state"],
                            "type": "object"
                          },
                          "outcome": {
                            "const": "handoff_required",
                            "type": "string"
                          },
                          "reason_code": {
                            "anyOf": [
                              {
                                "const": "knowledge_insufficient",
                                "type": "string"
                              },
                              {
                                "const": "source_conflict",
                                "type": "string"
                              },
                              {
                                "const": "policy_restricted",
                                "type": "string"
                              },
                              {
                                "const": "high_risk_business",
                                "type": "string"
                              },
                              {
                                "const": "acl_denied",
                                "type": "string"
                              },
                              {
                                "const": "provider_unavailable",
                                "type": "string"
                              },
                              {
                                "const": "provider_unknown",
                                "type": "string"
                              },
                              {
                                "const": "citation_invalid",
                                "type": "string"
                              },
                              {
                                "const": "output_blocked",
                                "type": "string"
                              },
                              {
                                "const": "user_requested_human",
                                "type": "string"
                              },
                              {
                                "const": "business_rule_handoff",
                                "type": "string"
                              }
                            ]
                          }
                        },
                        "required": ["outcome", "reason_code", "citations", "handoff"],
                        "type": "object"
                      }
                    ]
                  },
                  "author": {
                    "const": "assistant",
                    "type": "string"
                  },
                  "message_id": {
                    "pattern": "^msg_[0-9A-HJKMNP-TV-Z]{26}$",
                    "type": "string"
                  },
                  "parts": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "text": {
                          "maxLength": 8000,
                          "minLength": 1,
                          "type": "string"
                        },
                        "type": {
                          "const": "text",
                          "type": "string"
                        }
                      },
                      "required": ["type", "text"],
                      "type": "object"
                    },
                    "maxItems": 20,
                    "minItems": 1,
                    "type": "array"
                  },
                  "run_id": {
                    "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$",
                    "type": "string"
                  }
                },
                "required": ["author", "message_id", "run_id", "parts", "assistant_result"],
                "type": "object"
              }
            ]
          },
          "protocol_version": {
            "const": "1.0",
            "type": "string"
          },
          "sequence": {
            "maximum": 9007199254740991,
            "minimum": 1,
            "type": "integer"
          },
          "trace_id": {
            "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "type": {
            "const": "message.completed",
            "type": "string"
          }
        },
        "required": [
          "protocol_version",
          "event_id",
          "sequence",
          "conversation_id",
          "occurred_at",
          "trace_id",
          "type",
          "payload"
        ],
        "type": "object"
      },
      "StateChangedEvent": {
        "additionalProperties": false,
        "properties": {
          "conversation_id": {
            "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "event_id": {
            "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "payload": {
            "additionalProperties": false,
            "properties": {
              "actor": {
                "anyOf": [
                  {
                    "const": "visitor",
                    "type": "string"
                  },
                  {
                    "const": "assistant",
                    "type": "string"
                  },
                  {
                    "const": "system",
                    "type": "string"
                  }
                ]
              },
              "from_state": {
                "anyOf": [
                  {
                    "const": "bot_active",
                    "type": "string"
                  },
                  {
                    "const": "handoff_requested",
                    "type": "string"
                  },
                  {
                    "const": "queued",
                    "type": "string"
                  },
                  {
                    "const": "human_active",
                    "type": "string"
                  },
                  {
                    "const": "wrap_up",
                    "type": "string"
                  },
                  {
                    "const": "closed",
                    "type": "string"
                  }
                ]
              },
              "owner_epoch": {
                "maximum": 9007199254740991,
                "minimum": 1,
                "type": "integer"
              },
              "reason_code": {
                "anyOf": [
                  {
                    "const": "knowledge_insufficient",
                    "type": "string"
                  },
                  {
                    "const": "source_conflict",
                    "type": "string"
                  },
                  {
                    "const": "policy_restricted",
                    "type": "string"
                  },
                  {
                    "const": "high_risk_business",
                    "type": "string"
                  },
                  {
                    "const": "acl_denied",
                    "type": "string"
                  },
                  {
                    "const": "provider_unavailable",
                    "type": "string"
                  },
                  {
                    "const": "provider_unknown",
                    "type": "string"
                  },
                  {
                    "const": "citation_invalid",
                    "type": "string"
                  },
                  {
                    "const": "output_blocked",
                    "type": "string"
                  },
                  {
                    "const": "user_requested_human",
                    "type": "string"
                  },
                  {
                    "const": "business_rule_handoff",
                    "type": "string"
                  }
                ]
              },
              "state_version": {
                "maximum": 9007199254740991,
                "minimum": 1,
                "type": "integer"
              },
              "to_state": {
                "anyOf": [
                  {
                    "const": "bot_active",
                    "type": "string"
                  },
                  {
                    "const": "handoff_requested",
                    "type": "string"
                  },
                  {
                    "const": "queued",
                    "type": "string"
                  },
                  {
                    "const": "human_active",
                    "type": "string"
                  },
                  {
                    "const": "wrap_up",
                    "type": "string"
                  },
                  {
                    "const": "closed",
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "from_state",
              "to_state",
              "state_version",
              "owner_epoch",
              "reason_code",
              "actor"
            ],
            "type": "object"
          },
          "protocol_version": {
            "const": "1.0",
            "type": "string"
          },
          "sequence": {
            "maximum": 9007199254740991,
            "minimum": 1,
            "type": "integer"
          },
          "trace_id": {
            "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
            "type": "string"
          },
          "type": {
            "const": "conversation.state_changed",
            "type": "string"
          }
        },
        "required": [
          "protocol_version",
          "event_id",
          "sequence",
          "conversation_id",
          "occurred_at",
          "trace_id",
          "type",
          "payload"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "clientBearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "AI 客服 Client API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/client/v1/conversations": {
      "post": {
        "operationId": "createConversation",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 16,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "conversation_id": {
                          "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        },
                        "owner_epoch": {
                          "const": 1,
                          "type": "number"
                        },
                        "state": {
                          "const": "bot_active",
                          "type": "string"
                        },
                        "state_version": {
                          "const": 1,
                          "type": "number"
                        }
                      },
                      "required": ["conversation_id", "state", "state_version", "owner_epoch"],
                      "type": "object"
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求无效",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            },
                            {
                              "const": "quota_exceeded",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "clientBearer": []
          }
        ]
      }
    },
    "/client/v1/conversations/{conversation_id}/events": {
      "get": {
        "operationId": "listConversationEvents",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after_sequence",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "events": {
                          "items": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "conversation_id": {
                                    "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "event_id": {
                                    "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "occurred_at": {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  "payload": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "owner_epoch": {
                                        "const": 1,
                                        "type": "number"
                                      },
                                      "state": {
                                        "const": "bot_active",
                                        "type": "string"
                                      },
                                      "state_version": {
                                        "const": 1,
                                        "type": "number"
                                      }
                                    },
                                    "required": ["state", "state_version", "owner_epoch"],
                                    "type": "object"
                                  },
                                  "protocol_version": {
                                    "const": "1.0",
                                    "type": "string"
                                  },
                                  "sequence": {
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "trace_id": {
                                    "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "type": {
                                    "const": "conversation.snapshot",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "protocol_version",
                                  "event_id",
                                  "sequence",
                                  "conversation_id",
                                  "occurred_at",
                                  "trace_id",
                                  "type",
                                  "payload"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "conversation_id": {
                                    "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "event_id": {
                                    "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "occurred_at": {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  "payload": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "author": {
                                            "const": "visitor",
                                            "type": "string"
                                          },
                                          "message_id": {
                                            "pattern": "^msg_[0-9A-HJKMNP-TV-Z]{26}$",
                                            "type": "string"
                                          },
                                          "parts": {
                                            "items": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "text": {
                                                  "maxLength": 8000,
                                                  "minLength": 1,
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "text",
                                                  "type": "string"
                                                }
                                              },
                                              "required": ["type", "text"],
                                              "type": "object"
                                            },
                                            "maxItems": 20,
                                            "minItems": 1,
                                            "type": "array"
                                          }
                                        },
                                        "required": ["author", "message_id", "parts"],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "assistant_result": {
                                            "anyOf": [
                                              {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "citations": {
                                                    "items": {
                                                      "additionalProperties": false,
                                                      "properties": {
                                                        "citation_id": {
                                                          "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                                                          "type": "string"
                                                        },
                                                        "excerpt": {
                                                          "maxLength": 1024,
                                                          "minLength": 1,
                                                          "type": "string"
                                                        },
                                                        "title": {
                                                          "maxLength": 256,
                                                          "minLength": 1,
                                                          "type": "string"
                                                        },
                                                        "url": {
                                                          "format": "uri",
                                                          "maxLength": 2048,
                                                          "minLength": 9,
                                                          "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "citation_id",
                                                        "title",
                                                        "excerpt",
                                                        "url"
                                                      ],
                                                      "type": "object"
                                                    },
                                                    "maxItems": 20,
                                                    "minItems": 1,
                                                    "type": "array"
                                                  },
                                                  "outcome": {
                                                    "const": "answered",
                                                    "type": "string"
                                                  },
                                                  "reason_code": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": ["outcome", "reason_code", "citations"],
                                                "type": "object"
                                              },
                                              {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "citations": {
                                                    "items": {
                                                      "additionalProperties": false,
                                                      "properties": {
                                                        "citation_id": {
                                                          "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                                                          "type": "string"
                                                        },
                                                        "excerpt": {
                                                          "maxLength": 1024,
                                                          "minLength": 1,
                                                          "type": "string"
                                                        },
                                                        "title": {
                                                          "maxLength": 256,
                                                          "minLength": 1,
                                                          "type": "string"
                                                        },
                                                        "url": {
                                                          "format": "uri",
                                                          "maxLength": 2048,
                                                          "minLength": 9,
                                                          "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "citation_id",
                                                        "title",
                                                        "excerpt",
                                                        "url"
                                                      ],
                                                      "type": "object"
                                                    },
                                                    "maxItems": 20,
                                                    "type": "array"
                                                  },
                                                  "outcome": {
                                                    "const": "refused",
                                                    "type": "string"
                                                  },
                                                  "reason_code": {
                                                    "anyOf": [
                                                      {
                                                        "const": "knowledge_insufficient",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "source_conflict",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "policy_restricted",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "high_risk_business",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "acl_denied",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "provider_unavailable",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "provider_unknown",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "citation_invalid",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "output_blocked",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "user_requested_human",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "business_rule_handoff",
                                                        "type": "string"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": ["outcome", "reason_code", "citations"],
                                                "type": "object"
                                              },
                                              {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "citations": {
                                                    "items": {
                                                      "additionalProperties": false,
                                                      "properties": {
                                                        "citation_id": {
                                                          "pattern": "^cit_[0-9A-HJKMNP-TV-Z]{26}$",
                                                          "type": "string"
                                                        },
                                                        "excerpt": {
                                                          "maxLength": 1024,
                                                          "minLength": 1,
                                                          "type": "string"
                                                        },
                                                        "title": {
                                                          "maxLength": 256,
                                                          "minLength": 1,
                                                          "type": "string"
                                                        },
                                                        "url": {
                                                          "format": "uri",
                                                          "maxLength": 2048,
                                                          "minLength": 9,
                                                          "pattern": "^https://(?![^/?#]*@)[^\\s]+$",
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "citation_id",
                                                        "title",
                                                        "excerpt",
                                                        "url"
                                                      ],
                                                      "type": "object"
                                                    },
                                                    "maxItems": 20,
                                                    "type": "array"
                                                  },
                                                  "handoff": {
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "state": {
                                                        "const": "handoff_requested",
                                                        "type": "string"
                                                      },
                                                      "ticket_id": {
                                                        "pattern": "^ht_[0-9A-HJKMNP-TV-Z]{26}$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": ["ticket_id", "state"],
                                                    "type": "object"
                                                  },
                                                  "outcome": {
                                                    "const": "handoff_required",
                                                    "type": "string"
                                                  },
                                                  "reason_code": {
                                                    "anyOf": [
                                                      {
                                                        "const": "knowledge_insufficient",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "source_conflict",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "policy_restricted",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "high_risk_business",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "acl_denied",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "provider_unavailable",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "provider_unknown",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "citation_invalid",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "output_blocked",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "user_requested_human",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "const": "business_rule_handoff",
                                                        "type": "string"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "outcome",
                                                  "reason_code",
                                                  "citations",
                                                  "handoff"
                                                ],
                                                "type": "object"
                                              }
                                            ]
                                          },
                                          "author": {
                                            "const": "assistant",
                                            "type": "string"
                                          },
                                          "message_id": {
                                            "pattern": "^msg_[0-9A-HJKMNP-TV-Z]{26}$",
                                            "type": "string"
                                          },
                                          "parts": {
                                            "items": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "text": {
                                                  "maxLength": 8000,
                                                  "minLength": 1,
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "text",
                                                  "type": "string"
                                                }
                                              },
                                              "required": ["type", "text"],
                                              "type": "object"
                                            },
                                            "maxItems": 20,
                                            "minItems": 1,
                                            "type": "array"
                                          },
                                          "run_id": {
                                            "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "author",
                                          "message_id",
                                          "run_id",
                                          "parts",
                                          "assistant_result"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "protocol_version": {
                                    "const": "1.0",
                                    "type": "string"
                                  },
                                  "sequence": {
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "trace_id": {
                                    "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "type": {
                                    "const": "message.completed",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "protocol_version",
                                  "event_id",
                                  "sequence",
                                  "conversation_id",
                                  "occurred_at",
                                  "trace_id",
                                  "type",
                                  "payload"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "conversation_id": {
                                    "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "event_id": {
                                    "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "occurred_at": {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  "payload": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "actor": {
                                        "anyOf": [
                                          {
                                            "const": "visitor",
                                            "type": "string"
                                          },
                                          {
                                            "const": "assistant",
                                            "type": "string"
                                          },
                                          {
                                            "const": "system",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "from_state": {
                                        "anyOf": [
                                          {
                                            "const": "bot_active",
                                            "type": "string"
                                          },
                                          {
                                            "const": "handoff_requested",
                                            "type": "string"
                                          },
                                          {
                                            "const": "queued",
                                            "type": "string"
                                          },
                                          {
                                            "const": "human_active",
                                            "type": "string"
                                          },
                                          {
                                            "const": "wrap_up",
                                            "type": "string"
                                          },
                                          {
                                            "const": "closed",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "owner_epoch": {
                                        "maximum": 9007199254740991,
                                        "minimum": 1,
                                        "type": "integer"
                                      },
                                      "reason_code": {
                                        "anyOf": [
                                          {
                                            "const": "knowledge_insufficient",
                                            "type": "string"
                                          },
                                          {
                                            "const": "source_conflict",
                                            "type": "string"
                                          },
                                          {
                                            "const": "policy_restricted",
                                            "type": "string"
                                          },
                                          {
                                            "const": "high_risk_business",
                                            "type": "string"
                                          },
                                          {
                                            "const": "acl_denied",
                                            "type": "string"
                                          },
                                          {
                                            "const": "provider_unavailable",
                                            "type": "string"
                                          },
                                          {
                                            "const": "provider_unknown",
                                            "type": "string"
                                          },
                                          {
                                            "const": "citation_invalid",
                                            "type": "string"
                                          },
                                          {
                                            "const": "output_blocked",
                                            "type": "string"
                                          },
                                          {
                                            "const": "user_requested_human",
                                            "type": "string"
                                          },
                                          {
                                            "const": "business_rule_handoff",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "state_version": {
                                        "maximum": 9007199254740991,
                                        "minimum": 1,
                                        "type": "integer"
                                      },
                                      "to_state": {
                                        "anyOf": [
                                          {
                                            "const": "bot_active",
                                            "type": "string"
                                          },
                                          {
                                            "const": "handoff_requested",
                                            "type": "string"
                                          },
                                          {
                                            "const": "queued",
                                            "type": "string"
                                          },
                                          {
                                            "const": "human_active",
                                            "type": "string"
                                          },
                                          {
                                            "const": "wrap_up",
                                            "type": "string"
                                          },
                                          {
                                            "const": "closed",
                                            "type": "string"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "from_state",
                                      "to_state",
                                      "state_version",
                                      "owner_epoch",
                                      "reason_code",
                                      "actor"
                                    ],
                                    "type": "object"
                                  },
                                  "protocol_version": {
                                    "const": "1.0",
                                    "type": "string"
                                  },
                                  "sequence": {
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "trace_id": {
                                    "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "type": {
                                    "const": "conversation.state_changed",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "protocol_version",
                                  "event_id",
                                  "sequence",
                                  "conversation_id",
                                  "occurred_at",
                                  "trace_id",
                                  "type",
                                  "payload"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "conversation_id": {
                                    "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "event_id": {
                                    "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "occurred_at": {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  "payload": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "owner_epoch": {
                                        "maximum": 9007199254740991,
                                        "minimum": 1,
                                        "type": "integer"
                                      },
                                      "reason_code": {
                                        "anyOf": [
                                          {
                                            "const": "knowledge_insufficient",
                                            "type": "string"
                                          },
                                          {
                                            "const": "source_conflict",
                                            "type": "string"
                                          },
                                          {
                                            "const": "policy_restricted",
                                            "type": "string"
                                          },
                                          {
                                            "const": "high_risk_business",
                                            "type": "string"
                                          },
                                          {
                                            "const": "acl_denied",
                                            "type": "string"
                                          },
                                          {
                                            "const": "provider_unavailable",
                                            "type": "string"
                                          },
                                          {
                                            "const": "provider_unknown",
                                            "type": "string"
                                          },
                                          {
                                            "const": "citation_invalid",
                                            "type": "string"
                                          },
                                          {
                                            "const": "output_blocked",
                                            "type": "string"
                                          },
                                          {
                                            "const": "user_requested_human",
                                            "type": "string"
                                          },
                                          {
                                            "const": "business_rule_handoff",
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "state_version": {
                                        "maximum": 9007199254740991,
                                        "minimum": 1,
                                        "type": "integer"
                                      },
                                      "ticket_id": {
                                        "pattern": "^ht_[0-9A-HJKMNP-TV-Z]{26}$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ticket_id",
                                      "reason_code",
                                      "state_version",
                                      "owner_epoch"
                                    ],
                                    "type": "object"
                                  },
                                  "protocol_version": {
                                    "const": "1.0",
                                    "type": "string"
                                  },
                                  "sequence": {
                                    "maximum": 9007199254740991,
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "trace_id": {
                                    "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                                    "type": "string"
                                  },
                                  "type": {
                                    "const": "handoff.requested",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "protocol_version",
                                  "event_id",
                                  "sequence",
                                  "conversation_id",
                                  "occurred_at",
                                  "trace_id",
                                  "type",
                                  "payload"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "maxItems": 100,
                          "type": "array"
                        },
                        "next_sequence": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": ["events", "next_sequence"],
                      "type": "object"
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求无效",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "clientBearer": []
          }
        ]
      }
    },
    "/client/v1/conversations/{conversation_id}/handoff-requests": {
      "post": {
        "operationId": "createHandoffRequest",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 16,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "reason_code": {
                    "const": "user_requested_human",
                    "type": "string"
                  }
                },
                "required": ["reason_code"],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "state": {
                          "const": "handoff_requested",
                          "type": "string"
                        },
                        "ticket_id": {
                          "pattern": "^ht_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["ticket_id", "state"],
                      "type": "object"
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求无效",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "clientBearer": []
          }
        ]
      }
    },
    "/client/v1/conversations/{conversation_id}/messages": {
      "post": {
        "operationId": "createMessage",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "pattern": "^conv_[0-9A-HJKMNP-TV-Z]{26}$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 16,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "parts": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "text": {
                          "maxLength": 8000,
                          "minLength": 1,
                          "type": "string"
                        },
                        "type": {
                          "const": "text",
                          "type": "string"
                        }
                      },
                      "required": ["type", "text"],
                      "type": "object"
                    },
                    "maxItems": 20,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": ["parts"],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "accepted": {
                          "const": true,
                          "type": "boolean"
                        },
                        "message_id": {
                          "pattern": "^msg_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        },
                        "run_id": {
                          "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["accepted", "message_id", "run_id"],
                      "type": "object"
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求无效",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "clientBearer": []
          }
        ]
      }
    },
    "/client/v1/embed-tickets": {
      "post": {
        "operationId": "createEmbedTicket",
        "parameters": [
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "app_id": {
                    "pattern": "^app_[0-9A-HJKMNP-TV-Z]{26}$",
                    "type": "string"
                  },
                  "attribution": {
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                      "channel_code": {
                        "description": "去除首尾空白后为 1–100 个字符，且不得包含 ASCII 控制字符。",
                        "minLength": 1,
                        "pattern": "^(?!.*[\\u0000-\\u001F\\u007F])\\s*(?=\\S(?:.{0,98}\\S)?\\s*$).+\\s*$",
                        "type": "string"
                      },
                      "distributor_code": {
                        "description": "去除首尾空白后为 1–100 个字符，且不得包含 ASCII 控制字符。",
                        "minLength": 1,
                        "pattern": "^(?!.*[\\u0000-\\u001F\\u007F])\\s*(?=\\S(?:.{0,98}\\S)?\\s*$).+\\s*$",
                        "type": "string"
                      },
                      "game_version_id": {
                        "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}$",
                        "type": "string"
                      },
                      "promoter_code": {
                        "description": "去除首尾空白后为 1–100 个字符，且不得包含 ASCII 控制字符。",
                        "minLength": 1,
                        "pattern": "^(?!.*[\\u0000-\\u001F\\u007F])\\s*(?=\\S(?:.{0,98}\\S)?\\s*$).+\\s*$",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": ["app_id"],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "embed_ticket": {
                          "maxLength": 512,
                          "minLength": 32,
                          "pattern": "^[A-Za-z0-9_-]+$",
                          "type": "string"
                        },
                        "expires_at": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": ["embed_ticket", "expires_at"],
                      "type": "object"
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求无效",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/client/v1/realtime-tokens": {
      "post": {
        "operationId": "createRealtimeToken",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 16,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "realtime_expires_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "realtime_token": {
                          "maxLength": 512,
                          "minLength": 32,
                          "pattern": "^[A-Za-z0-9_-]+$",
                          "type": "string"
                        },
                        "realtime_url": {
                          "maxLength": 2048,
                          "minLength": 6,
                          "pattern": "^wss://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?(?:/[A-Za-z0-9._~/-]*)?$",
                          "type": "string"
                        },
                        "session_id": {
                          "pattern": "^ses_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "session_id",
                        "realtime_token",
                        "realtime_url",
                        "realtime_expires_at"
                      ],
                      "type": "object"
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求无效",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "clientBearer": []
          }
        ]
      }
    },
    "/client/v1/sessions": {
      "post": {
        "operationId": "createSession",
        "parameters": [
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "client": {
                    "additionalProperties": false,
                    "properties": {
                      "type": {
                        "const": "widget",
                        "type": "string"
                      },
                      "version": {
                        "maxLength": 64,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": ["type", "version"],
                    "type": "object"
                  },
                  "embed_ticket": {
                    "maxLength": 512,
                    "minLength": 32,
                    "pattern": "^[A-Za-z0-9_-]+$",
                    "type": "string"
                  },
                  "remember_session": {
                    "type": "boolean"
                  }
                },
                "required": ["embed_ticket", "client"],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "access_token": {
                              "maxLength": 512,
                              "minLength": 32,
                              "pattern": "^[A-Za-z0-9_-]+$",
                              "type": "string"
                            },
                            "capabilities": {
                              "additionalItems": false,
                              "items": [
                                {
                                  "const": "events_poll_v1",
                                  "type": "string"
                                }
                              ],
                              "minItems": 1,
                              "type": "array"
                            },
                            "expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "session_id": {
                              "pattern": "^ses_[0-9A-HJKMNP-TV-Z]{26}$",
                              "type": "string"
                            }
                          },
                          "required": ["session_id", "access_token", "expires_at", "capabilities"],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "access_token": {
                              "maxLength": 512,
                              "minLength": 32,
                              "pattern": "^[A-Za-z0-9_-]+$",
                              "type": "string"
                            },
                            "capabilities": {
                              "additionalItems": false,
                              "items": [
                                {
                                  "const": "events_poll_v1",
                                  "type": "string"
                                },
                                {
                                  "const": "resume_v1",
                                  "type": "string"
                                }
                              ],
                              "minItems": 2,
                              "type": "array"
                            },
                            "expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "resume_expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "session_id": {
                              "pattern": "^ses_[0-9A-HJKMNP-TV-Z]{26}$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "session_id",
                            "access_token",
                            "expires_at",
                            "resume_expires_at",
                            "capabilities"
                          ],
                          "type": "object"
                        }
                      ]
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求无效",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/client/v1/sessions/forget": {
      "post": {
        "operationId": "forgetSession",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 16,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "disposition": {
                          "anyOf": [
                            {
                              "const": "forgotten",
                              "type": "string"
                            },
                            {
                              "const": "already_forgotten",
                              "type": "string"
                            }
                          ]
                        },
                        "session_id": {
                          "pattern": "^ses_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["session_id", "disposition"],
                      "type": "object"
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求无效",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "clientBearer": []
          }
        ]
      }
    },
    "/client/v1/sessions/refresh": {
      "post": {
        "operationId": "refreshSession",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 16,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "embed_ticket": {
                    "maxLength": 512,
                    "minLength": 32,
                    "pattern": "^[A-Za-z0-9_-]+$",
                    "type": "string"
                  }
                },
                "required": ["embed_ticket"],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "access_token": {
                          "maxLength": 512,
                          "minLength": 32,
                          "pattern": "^[A-Za-z0-9_-]+$",
                          "type": "string"
                        },
                        "capabilities": {
                          "additionalItems": false,
                          "items": [
                            {
                              "const": "events_poll_v1",
                              "type": "string"
                            },
                            {
                              "const": "resume_v1",
                              "type": "string"
                            }
                          ],
                          "minItems": 2,
                          "type": "array"
                        },
                        "expires_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "resume_expires_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "session_id": {
                          "pattern": "^ses_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "session_id",
                        "access_token",
                        "expires_at",
                        "resume_expires_at",
                        "capabilities"
                      ],
                      "type": "object"
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求无效",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/client/v1/sessions/remember": {
      "post": {
        "operationId": "rememberSession",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 16,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "capabilities": {
                          "additionalItems": false,
                          "items": [
                            {
                              "const": "events_poll_v1",
                              "type": "string"
                            },
                            {
                              "const": "resume_v1",
                              "type": "string"
                            }
                          ],
                          "minItems": 2,
                          "type": "array"
                        },
                        "disposition": {
                          "anyOf": [
                            {
                              "const": "created",
                              "type": "string"
                            },
                            {
                              "const": "already_remembered",
                              "type": "string"
                            }
                          ]
                        },
                        "resume_expires_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "session_id": {
                          "pattern": "^ses_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "session_id",
                        "disposition",
                        "resume_expires_at",
                        "capabilities"
                      ],
                      "type": "object"
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求无效",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "clientBearer": []
          }
        ]
      }
    },
    "/client/v1/visitor-sessions": {
      "post": {
        "operationId": "createVisitorSession",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 16,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "minLength": 9,
              "pattern": "^https://(?![^/?#]*@)[A-Za-z0-9.-]+(?::[0-9]{1,5})?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "client": {
                    "additionalProperties": false,
                    "properties": {
                      "type": {
                        "const": "widget",
                        "type": "string"
                      },
                      "version": {
                        "maxLength": 64,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": ["type", "version"],
                    "type": "object"
                  },
                  "embed_ticket": {
                    "maxLength": 512,
                    "minLength": 32,
                    "pattern": "^[A-Za-z0-9_-]+$",
                    "type": "string"
                  },
                  "visitor_token": {
                    "maxLength": 117,
                    "minLength": 86,
                    "pattern": "^vst_[A-Za-z0-9-]{1,32}_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}_[A-Za-z0-9_-]{43}$",
                    "type": "string"
                  }
                },
                "required": ["visitor_token", "embed_ticket", "client"],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "access_token": {
                              "maxLength": 512,
                              "minLength": 32,
                              "pattern": "^[A-Za-z0-9_-]+$",
                              "type": "string"
                            },
                            "capabilities": {
                              "additionalItems": false,
                              "items": [
                                {
                                  "const": "events_poll_v1",
                                  "type": "string"
                                }
                              ],
                              "minItems": 1,
                              "type": "array"
                            },
                            "expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "session_id": {
                              "pattern": "^ses_[0-9A-HJKMNP-TV-Z]{26}$",
                              "type": "string"
                            }
                          },
                          "required": ["session_id", "access_token", "expires_at", "capabilities"],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "access_token": {
                              "maxLength": 512,
                              "minLength": 32,
                              "pattern": "^[A-Za-z0-9_-]+$",
                              "type": "string"
                            },
                            "capabilities": {
                              "additionalItems": false,
                              "items": [
                                {
                                  "const": "events_poll_v1",
                                  "type": "string"
                                },
                                {
                                  "const": "resume_v1",
                                  "type": "string"
                                }
                              ],
                              "minItems": 2,
                              "type": "array"
                            },
                            "expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "resume_expires_at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "session_id": {
                              "pattern": "^ses_[0-9A-HJKMNP-TV-Z]{26}$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "session_id",
                            "access_token",
                            "expires_at",
                            "resume_expires_at",
                            "capabilities"
                          ],
                          "type": "object"
                        }
                      ]
                    }
                  },
                  "required": ["data"],
                  "type": "object"
                }
              }
            },
            "description": "成功",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "anyOf": [
                            {
                              "const": "invalid_request",
                              "type": "string"
                            },
                            {
                              "const": "invalid_token",
                              "type": "string"
                            },
                            {
                              "const": "origin_not_allowed",
                              "type": "string"
                            },
                            {
                              "const": "payload_too_large",
                              "type": "string"
                            },
                            {
                              "const": "rate_limit_exceeded",
                              "type": "string"
                            },
                            {
                              "const": "conversation_not_found",
                              "type": "string"
                            },
                            {
                              "const": "idempotency_conflict",
                              "type": "string"
                            },
                            {
                              "const": "conversation_state_conflict",
                              "type": "string"
                            },
                            {
                              "const": "validation_error",
                              "type": "string"
                            },
                            {
                              "const": "temporarily_unavailable",
                              "type": "string"
                            }
                          ]
                        },
                        "message": {
                          "maxLength": 512,
                          "minLength": 1,
                          "type": "string"
                        },
                        "trace_id": {
                          "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                          "type": "string"
                        }
                      },
                      "required": ["code", "message", "trace_id"],
                      "type": "object"
                    }
                  },
                  "required": ["error"],
                  "type": "object"
                }
              }
            },
            "description": "请求失败",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "仅当请求 Origin 命中精确白名单时返回。",
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "const": "X-Trace-Id, Retry-After",
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Referrer-Policy": {
                "required": true,
                "schema": {
                  "const": "no-referrer",
                  "type": "string"
                }
              },
              "Vary": {
                "required": true,
                "schema": {
                  "const": "Origin",
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "const": "nosniff",
                  "type": "string"
                }
              },
              "X-Trace-Id": {
                "required": true,
                "schema": {
                  "pattern": "^tr_[0-9A-HJKMNP-TV-Z]{26}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": []
      }
    }
  }
}
